Tokenizer: Simplify '->' to '.'

This commit is contained in:
Daniel Marjamäki 2017-05-17 22:50:54 +02:00
parent bc12a0b21f
commit 7bd0bc7534
1 changed files with 4 additions and 3 deletions

View File

@ -1803,9 +1803,7 @@ void Tokenizer::combineOperators()
const bool cpp = isCPP();
// Combine tokens..
for (Token *tok = list.front();
tok && tok->next();
tok = tok->next()) {
for (Token *tok = list.front(); tok && tok->next(); tok = tok->next()) {
const char c1 = tok->str()[0];
if (tok->str().length() == 1 && tok->next()->str().length() == 1) {
@ -1870,6 +1868,9 @@ void Tokenizer::combineOperators()
tok->str(tok->str() + ":");
tok->deleteNext();
}
} else if (tok->str() == "->") {
tok->str(".");
tok->originalName("->");
}
}
}