Tokenizer(simplifyGoto): create links for inserted braces.

This commit is contained in:
Slava Semushin 2009-08-26 01:58:50 +07:00
parent 9569f758f8
commit 9a2a12c333
1 changed files with 4 additions and 0 deletions

View File

@ -3175,6 +3175,8 @@ void Tokenizer::simplifyGoto()
Token *token = *it;
if (token->next()->str() == name)
{
Token *openBrace = NULL;
// Delete the "goto name;"
token = token->previous();
token->deleteNext();
@ -3186,6 +3188,7 @@ void Tokenizer::simplifyGoto()
{
token->insertToken("{");
token = token->next();
openBrace = token;
}
// Insert the statements..
@ -3210,6 +3213,7 @@ void Tokenizer::simplifyGoto()
{
token->insertToken("}");
token = token->next();
Token::createMutualLinks(openBrace, token);
}
}
}