summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_parser.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-03-03 18:00:12 -0300
committerGitHub <noreply@github.com>2019-03-03 18:00:12 -0300
commita9fe834a8e962a7b9e15e5dc218af4b857b47da4 (patch)
tree238cbd6ea6d97aec228d4af9ae1ce00466767e89 /modules/gdscript/gdscript_parser.h
parent8b4c4d9b2fbfa39e71bc1e4f4fcdd5377a9396e4 (diff)
parentbda60bfa29a43315755bac92dc15fb0a1a30c22e (diff)
Merge pull request #26547 from vnen/gdscript-dependency-parse
Add a parse mode for GDScript which doesn't load dependencies
Diffstat (limited to 'modules/gdscript/gdscript_parser.h')
-rw-r--r--modules/gdscript/gdscript_parser.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h
index 9c1ea1c7e4..809bff8f20 100644
--- a/modules/gdscript/gdscript_parser.h
+++ b/modules/gdscript/gdscript_parser.h
@@ -533,6 +533,8 @@ private:
int error_line;
int error_column;
bool check_types;
+ bool dependencies_only;
+ List<String> dependencies;
#ifdef DEBUG_ENABLED
Set<int> *safe_lines;
#endif // DEBUG_ENABLED
@@ -634,7 +636,7 @@ public:
#ifdef DEBUG_ENABLED
const List<GDScriptWarning> &get_warnings() const { return warnings; }
#endif // DEBUG_ENABLED
- Error parse(const String &p_code, const String &p_base_path = "", bool p_just_validate = false, const String &p_self_path = "", bool p_for_completion = false, Set<int> *r_safe_lines = NULL);
+ Error parse(const String &p_code, const String &p_base_path = "", bool p_just_validate = false, const String &p_self_path = "", bool p_for_completion = false, Set<int> *r_safe_lines = NULL, bool p_dependencies_only = false);
Error parse_bytecode(const Vector<uint8_t> &p_bytecode, const String &p_base_path = "", const String &p_self_path = "");
bool is_tool_script() const;
@@ -653,6 +655,8 @@ public:
int get_completion_argument_index();
int get_completion_identifier_is_function();
+ const List<String> &get_dependencies() const { return dependencies; }
+
void clear();
GDScriptParser();
~GDScriptParser();