Enhance debug output for AST syntax error (inspired by #8747)

This commit is contained in:
amai2012 2018-09-10 08:55:46 +02:00
parent 4b249877f1
commit 9f5e648b9f
1 changed files with 1 additions and 1 deletions

View File

@ -1224,7 +1224,7 @@ void TokenList::validateAst() const
if (Token::Match(tok, "= {|^"))
continue;
if (!tok->astOperand1() || !tok->astOperand2())
throw InternalError(tok, "Syntax Error: AST broken, binary operator doesn't have two operands.", InternalError::AST);
throw InternalError(tok, "Syntax Error: AST broken, binary operator '" + tok->str() + "' doesn't have two operands.", InternalError::AST);
}
}
}