From 9f5e648b9f2236b86407e5fbb40a030573aeaef8 Mon Sep 17 00:00:00 2001 From: amai2012 Date: Mon, 10 Sep 2018 08:55:46 +0200 Subject: [PATCH] Enhance debug output for AST syntax error (inspired by #8747) --- lib/tokenlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 6b205ddb8..f9499443e 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -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); } } }