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
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')

View File

@ -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())