1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add support for Unicode identifiers in GDScript

This is using an adapted version of UAX#31 to not rely on the ICU
database (which isn't available in builds without TextServerAdvanced).
It allows most characters used in diverse scripts but not everything.
This commit is contained in:
George Marques
2023-01-18 22:56:00 -03:00
parent 2ec0da1a75
commit 7548e043fc
14 changed files with 145 additions and 33 deletions

View File

@@ -224,6 +224,9 @@ private:
char32_t indent_char = '\0';
int position = 0;
int length = 0;
#ifdef DEBUG_ENABLED
Vector<String> keyword_list;
#endif // DEBUG_ENABLED
#ifdef TOOLS_ENABLED
HashMap<int, CommentData> comments;
@@ -239,6 +242,10 @@ private:
void _skip_whitespace();
void check_indent();
#ifdef DEBUG_ENABLED
void make_keyword_list();
#endif // DEBUG_ENABLED
Token make_error(const String &p_message);
void push_error(const String &p_message);
void push_error(const Token &p_error);