Process mod in defines

This commit is contained in:
GriffinR
2021-12-19 18:48:06 -05:00
committed by huderlem
parent 7368f443f0
commit a6fb7eaeca
2 changed files with 4 additions and 0 deletions

View File

@@ -130,6 +130,7 @@ QMap<QString, int> Token::precedenceMap = QMap<QString, int>(
{
{"*", 3},
{"/", 3},
{"%", 3},
{"+", 4},
{"-", 4},
{"<<", 5},
@@ -194,6 +195,8 @@ int ParseUtil::evaluatePostfix(const QList<Token> &postfix) {
result = op1 * op2;
} else if (token.value == "/") {
result = op1 / op2;
} else if (token.value == "%") {
result = op1 % op2;
} else if (token.value == "+") {
result = op1 + op2;
} else if (token.value == "-") {