Fix testrunner

This commit is contained in:
Daniel Marjamäki 2021-04-24 14:07:26 +02:00
parent c9dc92c266
commit a41d8b436e
1 changed files with 4 additions and 2 deletions

View File

@ -1515,8 +1515,10 @@ static Token * createAstAtToken(Token *tok, bool cpp)
semicolon2->astOperand2(state3.op.top());
semicolon1->astOperand2(semicolon2);
} else {
tok2 = findAstTop(semicolon1->next(), semicolon2);
semicolon1->astOperand2(tok2 ? tok2 : state2.op.top());
if (!cpp || !Token::simpleMatch(state2.op.top(), ":"))
throw InternalError(tok, "syntax error", InternalError::SYNTAX);
semicolon1->astOperand2(state2.op.top());
}
if (init != semicolon1)