mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-29 00:39:55 +00: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