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

GDScript: Allow enum values to be set to constant expressions

Also allow them to access previous values wihout referencing the enum.
This commit is contained in:
George Marques
2020-08-18 17:44:20 -03:00
parent 99d4ea8c79
commit 35176247af
4 changed files with 96 additions and 16 deletions

View File

@@ -41,6 +41,8 @@ class GDScriptAnalyzer {
GDScriptParser *parser = nullptr;
HashMap<String, Ref<GDScriptParserRef>> depended_parsers;
const GDScriptParser::EnumNode *current_enum = nullptr;
Error resolve_inheritance(GDScriptParser::ClassNode *p_class, bool p_recursive = true);
GDScriptParser::DataType resolve_datatype(GDScriptParser::TypeNode *p_type);