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
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D
4 changed files with 96 additions and 16 deletions

View file

@ -405,7 +405,10 @@ public:
struct EnumNode : public Node {
struct Value {
IdentifierNode *identifier = nullptr;
LiteralNode *custom_value = nullptr;
ExpressionNode *custom_value = nullptr;
EnumNode *parent_enum = nullptr;
int index = -1;
bool resolved = false;
int value = 0;
int line = 0;
int leftmost_column = 0;