summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.h
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2020-11-26 14:41:55 -0300
committerGeorge Marques <george@gmarqu.es>2020-11-26 14:41:55 -0300
commit0cb185927c1021f07c8c2111fc73b7f712ea393f (patch)
tree6753bda3f1ba16fd781a125899bc74521a700b00 /modules/gdscript/gdscript_analyzer.h
parent613b76cfd5b57d6fb13f856ad149f2b47ca5dcb3 (diff)
downloadredot-engine-0cb185927c1021f07c8c2111fc73b7f712ea393f.tar.gz
GDScript: Improve handling of operators
- Use the new functions in Variant to determine the validity and resulting type of operators. - Split the operator function in codegen between binary and unary, since the unary ones have now a special requirement of having the second argument to be the NIL type when requesting info.
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.h')
-rw-r--r--modules/gdscript/gdscript_analyzer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_analyzer.h b/modules/gdscript/gdscript_analyzer.h
index 0a952cc621..7a06a61239 100644
--- a/modules/gdscript/gdscript_analyzer.h
+++ b/modules/gdscript/gdscript_analyzer.h
@@ -102,6 +102,7 @@ class GDScriptAnalyzer {
bool validate_call_arg(const List<GDScriptParser::DataType> &p_par_types, int p_default_args_count, bool p_is_vararg, const GDScriptParser::CallNode *p_call);
bool validate_call_arg(const MethodInfo &p_method, const GDScriptParser::CallNode *p_call);
GDScriptParser::DataType get_operation_type(Variant::Operator p_operation, const GDScriptParser::DataType &p_a, const GDScriptParser::DataType &p_b, bool &r_valid, const GDScriptParser::Node *p_source);
+ GDScriptParser::DataType get_operation_type(Variant::Operator p_operation, const GDScriptParser::DataType &p_a, bool &r_valid, const GDScriptParser::Node *p_source);
bool is_type_compatible(const GDScriptParser::DataType &p_target, const GDScriptParser::DataType &p_source, bool p_allow_implicit_conversion = false) const;
void push_error(const String &p_message, const GDScriptParser::Node *p_origin);
void mark_node_unsafe(const GDScriptParser::Node *p_node);