templates: extracted the template simplification into a separate function
This commit is contained in:
parent
0f59ef9064
commit
7a8b980627
|
@ -479,6 +479,12 @@ void Tokenizer::tokenize(std::istream &code, const char FileName[])
|
||||||
simplifyVarDecl();
|
simplifyVarDecl();
|
||||||
|
|
||||||
// Handle templates..
|
// Handle templates..
|
||||||
|
simplifyTemplates();
|
||||||
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void Tokenizer::simplifyTemplates()
|
||||||
|
{
|
||||||
for (Token *tok = _tokens; tok; tok = tok->next())
|
for (Token *tok = _tokens; tok; tok = tok->next())
|
||||||
{
|
{
|
||||||
if (!Token::simpleMatch(tok, "template <"))
|
if (!Token::simpleMatch(tok, "template <"))
|
||||||
|
|
|
@ -193,6 +193,11 @@ private:
|
||||||
*/
|
*/
|
||||||
void simplifyNamespaces();
|
void simplifyNamespaces();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simplify templates
|
||||||
|
*/
|
||||||
|
void simplifyTemplates();
|
||||||
|
|
||||||
void InsertTokens(Token *dest, Token *src, unsigned int n);
|
void InsertTokens(Token *dest, Token *src, unsigned int n);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue