diff options
author | George Marques <george@gmarqu.es> | 2021-05-26 14:05:31 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2021-05-26 14:09:00 -0300 |
commit | c7459e3855c07b63fb6235b86ef459f19641fb0f (patch) | |
tree | ee068bcb8a5ebb3debabfc27300b7077e37bc92a /modules/gdscript/gdscript_parser.h | |
parent | 313e1f62bb4ed85041bcd9290ec76660878fcd6b (diff) | |
download | redot-engine-c7459e3855c07b63fb6235b86ef459f19641fb0f.tar.gz |
GDScript: Use analyzer data to decide assignment conversion
Since there might be tricky cases in the analyzer (in the case of unsafe
lines) which would need to be properly checked again. Instead, this
splits the code generator in two functions and use information set by
the analyzer to tell which function to use, without a need to re-check.
Diffstat (limited to 'modules/gdscript/gdscript_parser.h')
-rw-r--r-- | modules/gdscript/gdscript_parser.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h index b1b29a7bd1..ee5e411cad 100644 --- a/modules/gdscript/gdscript_parser.h +++ b/modules/gdscript/gdscript_parser.h @@ -370,6 +370,7 @@ public: Variant::Operator variant_op = Variant::OP_MAX; ExpressionNode *assignee = nullptr; ExpressionNode *assigned_value = nullptr; + bool use_conversion_assign = false; AssignmentNode() { type = ASSIGNMENT; @@ -1119,6 +1120,7 @@ public: MultiplayerAPI::RPCMode rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED; int assignments = 0; int usages = 0; + bool use_conversion_assign = false; #ifdef TOOLS_ENABLED String doc_description; #endif // TOOLS_ENABLED |