Using run time string on the operators

This commit is contained in:
Felipe Zimmerle
2018-01-22 18:05:02 -03:00
parent 6a97dbee7a
commit a299997e02
74 changed files with 6884 additions and 6111 deletions

View File

@@ -27,8 +27,7 @@ namespace operators {
bool Eq::evaluate(Transaction *transaction, const std::string &input) {
int p = 0;
int i = 0;
bool eq = false;
std::string pt = MacroExpansion::expand(m_param, transaction);
std::string pt(m_string->evaluate(transaction));
try {
p = std::stoi(pt);
@@ -41,9 +40,7 @@ bool Eq::evaluate(Transaction *transaction, const std::string &input) {
i = 0;
}
eq = p == i;
return eq;
return p == i;
}