diff options
Diffstat (limited to 'core/script_language.h')
-rw-r--r-- | core/script_language.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/script_language.h b/core/script_language.h index 1b037e908c..53af4c74d1 100644 --- a/core/script_language.h +++ b/core/script_language.h @@ -122,6 +122,7 @@ public: virtual void get_script_method_list(List<MethodInfo> *p_list) const=0; virtual void get_script_property_list(List<PropertyInfo> *p_list) const=0; + virtual int get_member_line(const StringName& p_member) const { return 0; } Script() {} }; @@ -207,7 +208,26 @@ public: virtual bool has_named_classes() const=0; virtual int find_function(const String& p_function,const String& p_code) const=0; virtual String make_function(const String& p_class,const String& p_name,const StringArray& p_args) const=0; + virtual Error complete_code(const String& p_code, const String& p_base_path, Object*p_owner,List<String>* r_options,String& r_call_hint) { return ERR_UNAVAILABLE; } + + struct LookupResult { + enum Type { + RESULT_SCRIPT_LOCATION, + RESULT_CLASS, + RESULT_CLASS_CONSTANT, + RESULT_CLASS_PROPERTY, + RESULT_CLASS_METHOD + }; + Type type; + Ref<Script> script; + String class_name; + String class_member; + int location; + }; + + virtual Error lookup_code(const String& p_code, const String& p_symbol,const String& p_base_path, Object*p_owner,LookupResult& r_result) { return ERR_UNAVAILABLE; } + virtual void auto_indent_code(String& p_code,int p_from_line,int p_to_line) const=0; virtual void add_global_constant(const StringName& p_variable,const Variant& p_value)=0; |