GDScript: Restore support for Token::UNDERSCORE in identifiers

This commit is contained in:
HolonProduction 2024-07-13 22:20:20 +02:00
parent 97b8ad1af0
commit 06e732c3ed
3 changed files with 19 additions and 1 deletions

View file

@ -574,7 +574,9 @@ GDScriptTokenizer::Token GDScriptTokenizerText::potential_identifier() {
if (len == 1 && _peek(-1) == '_') {
// Lone underscore.
return make_token(Token::UNDERSCORE);
Token token = make_token(Token::UNDERSCORE);
token.literal = "_";
return token;
}
String name(_start, len);