summaryrefslogtreecommitdiff
path: root/core/math/expression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/expression.cpp')
-rw-r--r--core/math/expression.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/math/expression.cpp b/core/math/expression.cpp
index da52bb9465..d1ec987d56 100644
--- a/core/math/expression.cpp
+++ b/core/math/expression.cpp
@@ -434,14 +434,13 @@ Error Expression::_get_token(Token &r_token) {
}
return OK;
- } else if (is_ascii_char(cchar) || is_underscore(cchar)) {
- String id;
- bool first = true;
+ } else if (is_unicode_identifier_start(cchar)) {
+ String id = String::chr(cchar);
+ 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);
cchar = GET_CHAR();
- first = false;
}
str_ofs--; //go back one