diff options
Diffstat (limited to 'modules/gdscript/gdscript_tokenizer.cpp')
-rw-r--r-- | modules/gdscript/gdscript_tokenizer.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/modules/gdscript/gdscript_tokenizer.cpp b/modules/gdscript/gdscript_tokenizer.cpp index b30f81959e..818033025e 100644 --- a/modules/gdscript/gdscript_tokenizer.cpp +++ b/modules/gdscript/gdscript_tokenizer.cpp @@ -149,9 +149,12 @@ static const _bit _type_list[] = { { Variant::REAL, "float" }, { Variant::STRING, "String" }, { Variant::VECTOR2, "Vector2" }, + { Variant::VECTOR2I, "Vector2i" }, { Variant::RECT2, "Rect2" }, + { Variant::RECT2I, "Rect2i" }, { Variant::TRANSFORM2D, "Transform2D" }, { Variant::VECTOR3, "Vector3" }, + { Variant::VECTOR3I, "Vector3i" }, { Variant::AABB, "AABB" }, { Variant::PLANE, "Plane" }, { Variant::QUAT, "Quat" }, @@ -160,8 +163,11 @@ static const _bit _type_list[] = { { Variant::COLOR, "Color" }, { Variant::_RID, "RID" }, { Variant::OBJECT, "Object" }, + { Variant::STRING_NAME, "StringName" }, { Variant::NODE_PATH, "NodePath" }, { Variant::DICTIONARY, "Dictionary" }, + { Variant::CALLABLE, "Callable" }, + { Variant::SIGNAL, "Signal" }, { Variant::ARRAY, "Array" }, { Variant::PACKED_BYTE_ARRAY, "PackedByteArray" }, { Variant::PACKED_INT_ARRAY, "PackedIntArray" }, @@ -337,7 +343,7 @@ StringName GDScriptTokenizer::get_token_literal(int p_offset) const { default: { } } - } + } break; case TK_OP_AND: case TK_OP_OR: break; // Don't get into default, since they can be non-literal @@ -475,7 +481,7 @@ void GDScriptTokenizerText::_advance() { } while (true) { - bool is_node_path = false; + bool is_string_name = false; StringMode string_mode = STRING_DOUBLE_QUOTE; switch (GETCHAR(0)) { @@ -533,7 +539,7 @@ void GDScriptTokenizerText::_advance() { ignore_warnings = true; } #endif // DEBUG_ENABLED - FALLTHROUGH; + [[fallthrough]]; } case '\n': { line++; @@ -749,8 +755,8 @@ void GDScriptTokenizerText::_advance() { return; } INCPOS(1); - is_node_path = true; - FALLTHROUGH; + is_string_name = true; + [[fallthrough]]; case '\'': case '"': { @@ -860,8 +866,8 @@ void GDScriptTokenizerText::_advance() { } INCPOS(i); - if (is_node_path) { - _make_constant(NodePath(str)); + if (is_string_name) { + _make_constant(StringName(str)); } else { _make_constant(str); } |