dump: add externLang attribute for tokens

This commit is contained in:
Daniel Marjamäki 2022-09-15 19:57:17 +02:00
parent 7111270d5f
commit f1aa9eb48f
1 changed files with 3 additions and 1 deletions

View File

@ -3018,7 +3018,7 @@ void Tokenizer::simplifyExternC()
tok->linkAt(2)->deleteThis(); // } tok->linkAt(2)->deleteThis(); // }
tok->deleteNext(2); // "C" { tok->deleteNext(2); // "C" {
} else { } else {
while ((tok2 = tok2->next()) && !Token::simpleMatch(tok2, ";")) while ((tok2 = tok2->next()) && !Token::Match(tok2, "[;{]"))
tok2->isExternC(true); tok2->isExternC(true);
tok->deleteNext(); // "C" tok->deleteNext(); // "C"
} }
@ -5247,6 +5247,8 @@ void Tokenizer::dump(std::ostream &out) const
else if (tok->tokType() == Token::eLogicalOp) else if (tok->tokType() == Token::eLogicalOp)
out << " isLogicalOp=\"true\""; out << " isLogicalOp=\"true\"";
} }
if (tok->isExternC())
out << " externLang=\"C\"";
if (tok->isExpandedMacro()) if (tok->isExpandedMacro())
out << " isExpandedMacro=\"true\""; out << " isExpandedMacro=\"true\"";
if (tok->isRemovedVoidParameter()) if (tok->isRemovedVoidParameter())