diff options
author | George Marques <george@gmarqu.es> | 2018-06-19 02:55:52 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2018-07-20 21:55:18 -0300 |
commit | 3445dca01d81cfca7d5233ab7e3fda2798f75dc5 (patch) | |
tree | 357482c6528d4879f1ed80a6cddeaa2fe1cb3678 /modules/gdscript/gdscript_parser.h | |
parent | 03746da73f275030832f83373388cb0f248616eb (diff) | |
download | redot-engine-3445dca01d81cfca7d5233ab7e3fda2798f75dc5.tar.gz |
Add ability to infer variable type from assigned value
Syntax: var x : = 42
Infers the type of "x" to be an integer.
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 2650f619f8..48f256b4c6 100644 --- a/modules/gdscript/gdscript_parser.h +++ b/modules/gdscript/gdscript_parser.h @@ -56,6 +56,7 @@ public: bool has_type; bool is_constant; bool is_meta_type; // Whether the value can be used as a type + bool infer_type; Variant::Type builtin_type; StringName native_type; @@ -93,6 +94,7 @@ public: has_type(false), is_constant(false), is_meta_type(false), + infer_type(false), builtin_type(Variant::NIL), class_type(NULL) {} }; |