summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.h
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2020-06-10 19:53:25 -0300
committerGeorge Marques <george@gmarqu.es>2020-07-20 11:38:40 -0300
commit9a76ab8b6a787edd6e09be4b7833eaf8703cbff7 (patch)
tree6d741595231cbd7ac8534147c0c46497162d4886 /modules/gdscript/gdscript_parser.h
parent17cd6347ba96d4e64cba475854e842e0a490a465 (diff)
downloadredot-engine-9a76ab8b6a787edd6e09be4b7833eaf8703cbff7.tar.gz
Add new GDScript type checker
Diffstat (limited to 'modules/gdscript/gdscript_parser.h')
-rw-r--r--modules/gdscript/gdscript_parser.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h
index ec5e78bd4f..23b8fc249c 100644
--- a/modules/gdscript/gdscript_parser.h
+++ b/modules/gdscript/gdscript_parser.h
@@ -127,6 +127,7 @@ public:
_FORCE_INLINE_ bool is_set() const { return kind != UNRESOLVED; }
_FORCE_INLINE_ bool has_no_type() const { return type_source == UNDETECTED; }
_FORCE_INLINE_ bool is_variant() const { return kind == VARIANT; }
+ _FORCE_INLINE_ bool is_hard_type() const { return type_source > INFERRED; }
String to_string() const;
bool operator==(const DataType &p_other) const {
@@ -591,6 +592,7 @@ public:
TypeNode *return_type = nullptr;
SuiteNode *body = nullptr;
bool is_static = false;
+ bool is_coroutine = false;
MultiplayerAPI::RPCMode rpc_mode = MultiplayerAPI::RPC_MODE_DISABLED;
bool resolved_signature = false;
@@ -620,7 +622,8 @@ public:
LOCAL_VARIABLE,
LOCAL_ITERATOR, // `for` loop iterator.
LOCAL_BIND, // Pattern bind.
- // TODO: Add higher sources to help compiling?
+ MEMBER_VARIABLE,
+ MEMBER_CONSTANT,
};
Source source = UNDEFINED_SOURCE;