AST: Fixed ast for a:🅱️:c..

This commit is contained in:
Daniel Marjamäki 2021-05-03 20:33:03 +02:00
parent 70ab30e3c6
commit 82636d4f07
1 changed files with 2 additions and 0 deletions

View File

@ -888,6 +888,8 @@ static void compileScope(Token *&tok, AST_state& state)
while (tok) {
if (tok->str() == "::") {
const Token *lastOp = state.op.empty() ? nullptr : state.op.top();
if (Token::Match(lastOp, ":: %name%"))
lastOp = lastOp->next();
if (Token::Match(lastOp, "%name%") &&
(lastOp->next() == tok || (Token::Match(lastOp, "%name% <") && lastOp->linkAt(1) && tok == lastOp->linkAt(1)->next())))
compileBinOp(tok, state, compileTerm);