summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/gdscript_parser.h')
-rw-r--r--modules/gdscript/gdscript_parser.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h
index 0903f62061..bc0fe58fa7 100644
--- a/modules/gdscript/gdscript_parser.h
+++ b/modules/gdscript/gdscript_parser.h
@@ -122,6 +122,7 @@ public:
TypeSource type_source = UNDETECTED;
bool is_constant = false;
+ bool is_read_only = false;
bool is_meta_type = false;
bool is_coroutine = false; // For function calls.
@@ -190,7 +191,7 @@ public:
case SCRIPT:
return script_type == p_other.script_type;
case CLASS:
- return class_type == p_other.class_type;
+ return class_type == p_other.class_type || class_type->fqcn == p_other.class_type->fqcn;
case RESOLVING:
case UNRESOLVED:
break;
@@ -206,6 +207,7 @@ public:
void operator=(const DataType &p_other) {
kind = p_other.kind;
type_source = p_other.type_source;
+ is_read_only = p_other.is_read_only;
is_constant = p_other.is_constant;
is_meta_type = p_other.is_meta_type;
is_coroutine = p_other.is_coroutine;
@@ -758,7 +760,6 @@ public:
};
struct ContinueNode : public Node {
- bool is_for_match = false;
ContinueNode() {
type = CONTINUE;
}
@@ -971,6 +972,7 @@ public:
struct ReturnNode : public Node {
ExpressionNode *return_value = nullptr;
+ bool void_return = false;
ReturnNode() {
type = RETURN;
@@ -1254,7 +1256,6 @@ private:
bool panic_mode = false;
bool can_break = false;
bool can_continue = false;
- bool is_continue_match = false; // Whether a `continue` will act on a `match`.
List<bool> multiline_stack;
ClassNode *head = nullptr;
@@ -1361,8 +1362,11 @@ private:
void clear();
void push_error(const String &p_message, const Node *p_origin = nullptr);
#ifdef DEBUG_ENABLED
- void push_warning(const Node *p_source, GDScriptWarning::Code p_code, const String &p_symbol1 = String(), const String &p_symbol2 = String(), const String &p_symbol3 = String(), const String &p_symbol4 = String());
void push_warning(const Node *p_source, GDScriptWarning::Code p_code, const Vector<String> &p_symbols);
+ template <typename... Symbols>
+ void push_warning(const Node *p_source, GDScriptWarning::Code p_code, const Symbols &...p_symbols) {
+ push_warning(p_source, p_code, Vector<String>{ p_symbols... });
+ }
#endif
void make_completion_context(CompletionType p_type, Node *p_node, int p_argument = -1, bool p_force = false);