Tokenizer(simplifyGoto): create links for inserted braces.
This commit is contained in:
parent
9569f758f8
commit
9a2a12c333
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue