Put 'isExpandedMacro' info in the dump files

This commit is contained in:
Daniel Marjamäki 2019-08-15 14:24:39 +02:00
parent 178568f41f
commit f33a8a417f
2 changed files with 6 additions and 0 deletions

View File

@ -118,6 +118,7 @@ class Token:
isLogicalOp Is this token a logical operator: && ||
isUnsigned Is this token a unsigned type
isSigned Is this token a signed type
isExpandedMacro Is this token a expanded macro token
varId varId for token, each variable has a unique non-zero id
variable Variable information for this token. See the Variable class.
function If this token points at a function call, this attribute has the Function
@ -165,6 +166,7 @@ class Token:
isLogicalOp = False
isUnsigned = False
isSigned = False
isExpandedMacro = False
varId = None
variableId = None
variable = None
@ -223,6 +225,8 @@ class Token:
self.isComparisonOp = True
elif element.get('isLogicalOp'):
self.isLogicalOp = True
if element.get('isExpandedMacro'):
self.isExpandedMacro = True
self.linkId = element.get('link')
self.link = None
if element.get('varId'):

View File

@ -4860,6 +4860,8 @@ void Tokenizer::dump(std::ostream &out) const
else if (tok->tokType() == Token::eLogicalOp)
out << " isLogicalOp=\"True\"";
}
if (tok->isExpandedMacro())
out << " isExpandedMacro=\"True\"";
if (tok->link())
out << " link=\"" << tok->link() << '\"';
if (tok->varId() > 0)