You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Add support for Unicode identifiers in Expression class
This commit is contained in:
@@ -434,14 +434,13 @@ Error Expression::_get_token(Token &r_token) {
|
|||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
} else if (is_ascii_char(cchar) || is_underscore(cchar)) {
|
} else if (is_unicode_identifier_start(cchar)) {
|
||||||
String id;
|
String id = String::chr(cchar);
|
||||||
bool first = true;
|
cchar = GET_CHAR();
|
||||||
|
|
||||||
while (is_ascii_char(cchar) || is_underscore(cchar) || (!first && is_digit(cchar))) {
|
while (is_unicode_identifier_continue(cchar)) {
|
||||||
id += String::chr(cchar);
|
id += String::chr(cchar);
|
||||||
cchar = GET_CHAR();
|
cchar = GET_CHAR();
|
||||||
first = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
str_ofs--; //go back one
|
str_ofs--; //go back one
|
||||||
|
|||||||
Reference in New Issue
Block a user