Expose exprId to addon (#4354)

This commit is contained in:
Paul Fultz II 2022-08-16 15:00:31 -05:00 committed by GitHub
parent a8c1cdca57
commit 72c764b034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -278,6 +278,7 @@ class Token:
isSplittedVarDeclComma = False isSplittedVarDeclComma = False
isSplittedVarDeclEq = False isSplittedVarDeclEq = False
isImplicitInt = False isImplicitInt = False
exprId = None
varId = None varId = None
variableId = None variableId = None
variable = None variable = None
@ -351,6 +352,8 @@ class Token:
self.link = None self.link = None
if element.get('varId'): if element.get('varId'):
self.varId = int(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.variableId = element.get('variable')
self.variable = None self.variable = None
self.functionId = element.get('function') self.functionId = element.get('function')

View File

@ -5263,6 +5263,8 @@ void Tokenizer::dump(std::ostream &out) const
out << " link=\"" << tok->link() << '\"'; out << " link=\"" << tok->link() << '\"';
if (tok->varId() > 0) if (tok->varId() > 0)
out << " varId=\"" << MathLib::toString(tok->varId()) << '\"'; out << " varId=\"" << MathLib::toString(tok->varId()) << '\"';
if (tok->exprId() > 0)
out << " exprId=\"" << MathLib::toString(tok->exprId()) << '\"';
if (tok->variable()) if (tok->variable())
out << " variable=\"" << tok->variable() << '\"'; out << " variable=\"" << tok->variable() << '\"';
if (tok->function()) if (tok->function())