Skip to content

Commit

Permalink
Fix AST
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Feb 24, 2024
1 parent 368b614 commit 1e2fe97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tokenlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ static void compilePrecedence2(Token *&tok, AST_state& state)
|| (tok->strAt(-1) == ">" && tok->linkAt(-1))
|| (tok->strAt(-1) == ")" && !iscast(tok->linkAt(-1), state.cpp)) // Don't treat brackets to clarify precedence as function calls
|| (tok->strAt(-1) == "}" && opPrevTopSquare)) {
const bool operandInside = oldOpSize < state.op.size();
const bool operandInside = oldOpSize < state.op.size() || (state.cpp && Token::simpleMatch(tok, "( & )"));
if (operandInside)
compileBinOp(tok, state, nullptr);
else
Expand Down

0 comments on commit 1e2fe97

Please sign in to comment.