TokenList::validateAst: optimised ~25%
This commit is contained in:
parent
ecccce0608
commit
ab6167e3e6
|
@ -1195,10 +1195,13 @@ void TokenList::validateAst() const
|
||||||
astTokens.insert(parent);
|
astTokens.insert(parent);
|
||||||
} while ((parent = parent->astParent()) != nullptr);
|
} while ((parent = parent->astParent()) != nullptr);
|
||||||
safeAstTokens.insert(astTokens.begin(), astTokens.end());
|
safeAstTokens.insert(astTokens.begin(), astTokens.end());
|
||||||
} else
|
} else if (tok->str() == ";") {
|
||||||
|
safeAstTokens.clear();
|
||||||
|
} else {
|
||||||
safeAstTokens.insert(tok);
|
safeAstTokens.insert(tok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const std::string& TokenList::file(const Token *tok) const
|
const std::string& TokenList::file(const Token *tok) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue