summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_compiler.h
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2018-05-29 23:16:57 -0300
committerGeorge Marques <george@gmarqu.es>2018-07-20 21:55:17 -0300
commite3d72d14ff27af2b396397065ddc38f87685c694 (patch)
tree94fcdf65d7cc981042811c6c3050d81684604473 /modules/gdscript/gdscript_compiler.h
parent4b18c4e448c93fbb44c80b89e744cfacea8d8bc4 (diff)
downloadredot-engine-e3d72d14ff27af2b396397065ddc38f87685c694.tar.gz
Use type information to enable GDScript introspection
This makes the Script API provide accurate information when requesting property or method info.
Diffstat (limited to 'modules/gdscript/gdscript_compiler.h')
-rw-r--r--modules/gdscript/gdscript_compiler.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_compiler.h b/modules/gdscript/gdscript_compiler.h
index 19df9bd722..55f5e2b48e 100644
--- a/modules/gdscript/gdscript_compiler.h
+++ b/modules/gdscript/gdscript_compiler.h
@@ -41,6 +41,7 @@ class GDScriptCompiler {
Map<StringName, Ref<GDScript> > class_map;
Set<StringName> parsed_classes;
Set<StringName> parsing_classes;
+ GDScript *main_script;
struct CodeGen {
GDScript *script;
@@ -142,6 +143,8 @@ class GDScriptCompiler {
bool _create_unary_operator(CodeGen &codegen, const GDScriptParser::OperatorNode *on, Variant::Operator op, int p_stack_level);
bool _create_binary_operator(CodeGen &codegen, const GDScriptParser::OperatorNode *on, Variant::Operator op, int p_stack_level, bool p_initializer = false);
+ GDScriptDataType _gdtype_from_datatype(const GDScriptParser::DataType &p_datatype) const;
+
int _parse_assign_right_expression(CodeGen &codegen, const GDScriptParser::OperatorNode *p_expression, int p_stack_level);
int _parse_expression(CodeGen &codegen, const GDScriptParser::Node *p_expression, int p_stack_level, bool p_root = false, bool p_initializer = false);
Error _parse_block(CodeGen &codegen, const GDScriptParser::BlockNode *p_block, int p_stack_level = 0, int p_break_addr = -1, int p_continue_addr = -1);