diff --git a/addons/cppcheckdata.py b/addons/cppcheckdata.py index af0c99132..3e76371e5 100755 --- a/addons/cppcheckdata.py +++ b/addons/cppcheckdata.py @@ -278,6 +278,7 @@ class Token: isSplittedVarDeclComma = False isSplittedVarDeclEq = False isImplicitInt = False + exprId = None varId = None variableId = None variable = None @@ -351,6 +352,8 @@ class Token: self.link = None if element.get('varId'): self.varId = int(element.get('varId')) + if element.get('exprId'): + self.exprId = int(element.get('exprId')) self.variableId = element.get('variable') self.variable = None self.functionId = element.get('function') diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 1a0a0fa5a..65ad81481 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -5263,6 +5263,8 @@ void Tokenizer::dump(std::ostream &out) const out << " link=\"" << tok->link() << '\"'; if (tok->varId() > 0) out << " varId=\"" << MathLib::toString(tok->varId()) << '\"'; + if (tok->exprId() > 0) + out << " exprId=\"" << MathLib::toString(tok->exprId()) << '\"'; if (tok->variable()) out << " variable=\"" << tok->variable() << '\"'; if (tok->function())