Enhance debug output for AST syntax error (inspired by #8747)
This commit is contained in:
parent
4b249877f1
commit
9f5e648b9f
|
@ -1224,7 +1224,7 @@ void TokenList::validateAst() const
|
||||||
if (Token::Match(tok, "= {|^"))
|
if (Token::Match(tok, "= {|^"))
|
||||||
continue;
|
continue;
|
||||||
if (!tok->astOperand1() || !tok->astOperand2())
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue