tokenizer : using the simplifyKnownVariables

This commit is contained in:
Daniel Marjamäki 2008-12-18 07:19:35 +00:00
parent 612d0e56f2
commit 69137597f5
1 changed files with 8 additions and 17 deletions

View File

@ -1013,20 +1013,15 @@ void Tokenizer::simplifyTokenList()
}
}
bool done = false;
while ( ! done )
bool modified = true;
while ( modified )
{
done = true;
if( simplifyConditions() )
done = false;
if( simplifyCasts() )
done = false;
if( simplifyFunctionReturn() )
done = false;
}
modified = false;
modified |= simplifyConditions();
modified |= simplifyCasts();
modified |= simplifyFunctionReturn();
modified |= simplifyKnownVariables();
}
}
//---------------------------------------------------------------------------
@ -1179,10 +1174,6 @@ bool Tokenizer::simplifyFunctionReturn()
bool Tokenizer::simplifyKnownVariables()
{
// TODO, this function should be called from simplifyTokenList()
// after the implementation is done.
// TODO, this functions needs to be implemented.
// TODO, test
bool ret = false;
for ( TOKEN *tok = _tokens; tok; tok = tok->next() )
{