summaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_script.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/gd_script.h')
-rw-r--r--modules/gdscript/gd_script.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.h b/modules/gdscript/gd_script.h
index 0c3e1eb614..cb20361068 100644
--- a/modules/gdscript/gd_script.h
+++ b/modules/gdscript/gd_script.h
@@ -65,6 +65,7 @@ class GDScript : public Script {
StringName setter;
StringName getter;
ScriptInstance::RPCMode rpc_mode;
+
};
friend class GDInstance;
@@ -86,8 +87,11 @@ friend class GDScriptLanguage;
Map<StringName,Ref<GDScript> > subclasses;
Map<StringName,Vector<StringName> > _signals;
+
#ifdef TOOLS_ENABLED
+ Map<StringName,int> member_lines;
+
Map<StringName,Variant> member_default_values;
List<PropertyInfo> members_cache;
@@ -193,6 +197,16 @@ public:
virtual ScriptLanguage *get_language() const;
+ virtual int get_member_line(const StringName& p_member) const {
+#ifdef TOOLS_ENABLED
+ if (member_lines.has(p_member))
+ return member_lines[p_member];
+ else
+#endif
+ return -1;
+
+ }
+
GDScript();
~GDScript();
};
@@ -394,6 +408,7 @@ public:
virtual int find_function(const String& p_function,const String& p_code) const;
virtual String make_function(const String& p_class,const String& p_name,const StringArray& p_args) const;
virtual Error complete_code(const String& p_code, const String& p_base_path, Object*p_owner,List<String>* r_options,String& r_call_hint);
+ virtual Error lookup_code(const String& p_code, const String& p_symbol, const String& p_base_path, Object*p_owner, LookupResult& r_result);
virtual void auto_indent_code(String& p_code,int p_from_line,int p_to_line) const;
virtual void add_global_constant(const StringName& p_variable,const Variant& p_value);