Use new findsimplematch API for simple patterns

This commit is contained in:
Thomas Jarosch 2011-10-28 12:49:03 +02:00
parent bab740289c
commit ef8f49bbf3
1 changed files with 3 additions and 3 deletions

View File

@ -2286,13 +2286,13 @@ bool Tokenizer::tokenize(std::istream &code,
continue; continue;
//find the two needed semicolons inside the 'for' //find the two needed semicolons inside the 'for'
const Token *firstsemicolon = Token::findmatch(tok->next(), ";", tok->next()->link()); const Token *firstsemicolon = Token::findsimplematch(tok->next(), ";", tok->next()->link());
if (!firstsemicolon) if (!firstsemicolon)
continue; continue;
const Token *secondsemicolon = Token::findmatch(firstsemicolon->next(), ";", tok->next()->link()); const Token *secondsemicolon = Token::findsimplematch(firstsemicolon->next(), ";", tok->next()->link());
if (!secondsemicolon) if (!secondsemicolon)
continue; continue;
if (Token::findmatch(secondsemicolon->next(), ";", tok->next()->link())) if (Token::findsimplematch(secondsemicolon->next(), ";", tok->next()->link()))
continue; //no more than two semicolons! continue; //no more than two semicolons!
if (!tok->next()->link()->next()) if (!tok->next()->link()->next())
continue; //there should be always something after 'for (...)' continue; //there should be always something after 'for (...)'