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,19 +1013,14 @@ void Tokenizer::simplifyTokenList()
} }
} }
bool modified = true;
bool done = false; while ( modified )
while ( ! done )
{ {
done = true; modified = false;
if( simplifyConditions() ) modified |= simplifyConditions();
done = false; modified |= simplifyCasts();
modified |= simplifyFunctionReturn();
if( simplifyCasts() ) modified |= simplifyKnownVariables();
done = false;
if( simplifyFunctionReturn() )
done = false;
} }
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -1179,10 +1174,6 @@ bool Tokenizer::simplifyFunctionReturn()
bool Tokenizer::simplifyKnownVariables() 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; bool ret = false;
for ( TOKEN *tok = _tokens; tok; tok = tok->next() ) for ( TOKEN *tok = _tokens; tok; tok = tok->next() )
{ {