mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-21 08:33:45 +08:00
codegen_style: preparing to parse the whole input file.
This commit is contained in:
@@ -148,18 +148,18 @@ Type BasicTokenizedFile::uniteLastTokens(Type type) {
|
||||
}
|
||||
|
||||
Type BasicTokenizedFile::readNameOrNumber() {
|
||||
bool onlyDigits = true;
|
||||
while (!reader_.atEnd()) {
|
||||
if (!isDigitChar(reader_.currentChar())) {
|
||||
onlyDigits = false;
|
||||
break;
|
||||
}
|
||||
reader_.skipChar();
|
||||
}
|
||||
bool onlyDigits = true;
|
||||
while (!reader_.atEnd()) {
|
||||
if (!isNameChar(reader_.currentChar())) {
|
||||
break;
|
||||
}
|
||||
onlyDigits = false;
|
||||
reader_.skipChar();
|
||||
}
|
||||
return saveToken(onlyDigits ? Type::Int : Type::Name);
|
||||
|
||||
Reference in New Issue
Block a user