Tokenizer::simplifyTypedef: 'tokAt(offset)=>tokOffset': in progress..
This commit is contained in:
parent
017f0090fa
commit
d9e9c0aceb
|
@ -1014,18 +1014,27 @@ void Tokenizer::simplifyTypedef()
|
||||||
tokOffset = tokOffset->next();
|
tokOffset = tokOffset->next();
|
||||||
}
|
}
|
||||||
|
|
||||||
typeEnd = tok->tokAt(offset++);
|
++offset;
|
||||||
|
typeEnd = tokOffset;
|
||||||
|
tokOffset = tokOffset->next();
|
||||||
|
|
||||||
bool atEnd = false;
|
bool atEnd = false;
|
||||||
while (!atEnd) {
|
while (!atEnd) {
|
||||||
if (Token::simpleMatch(tok->tokAt(offset), "::"))
|
if (tokOffset && tokOffset->str() == "::") {
|
||||||
typeEnd = tok->tokAt(offset++);
|
++offset;
|
||||||
|
typeEnd = tokOffset;
|
||||||
|
tokOffset = tokOffset->next();
|
||||||
|
}
|
||||||
|
|
||||||
if (Token::Match(tok->tokAt(offset), "%type%") &&
|
if (Token::Match(tokOffset, "%type%") &&
|
||||||
tok->tokAt(offset + 1) && !Token::Match(tok->tokAt(offset + 1), "[|;|,|("))
|
tokOffset->next() && !Token::Match(tokOffset->next(), "[|;|,|(")) {
|
||||||
typeEnd = tok->tokAt(offset++);
|
++offset;
|
||||||
else if (Token::simpleMatch(tok->tokAt(offset), "const (")) {
|
typeEnd = tokOffset;
|
||||||
typeEnd = tok->tokAt(offset++);
|
tokOffset = tokOffset->next();
|
||||||
|
} else if (Token::simpleMatch(tokOffset, "const (")) {
|
||||||
|
++offset;
|
||||||
|
typeEnd = tokOffset;
|
||||||
|
tokOffset = tokOffset->next();
|
||||||
atEnd = true;
|
atEnd = true;
|
||||||
} else
|
} else
|
||||||
atEnd = true;
|
atEnd = true;
|
||||||
|
|
Loading…
Reference in New Issue