diff options
author | geequlim <geequlim@gmail.com> | 2019-06-23 21:10:28 +0800 |
---|---|---|
committer | geequlim <geequlim@gmail.com> | 2019-08-11 13:30:15 +0800 |
commit | fa6d6a329c93224b5454b17603284913da0472a3 (patch) | |
tree | 6247b59ba4313cb1af1b80efbf45fab2bff10dba /modules/gdscript/language_server/gdscript_extend_parser.h | |
parent | 37aafaaa9cc7d66c85fd9395e46b2386d899ba12 (diff) | |
download | redot-engine-fa6d6a329c93224b5454b17603284913da0472a3.tar.gz |
Add optional smart resolve sulotion
The smart resolvaion can guess most symbols but it might be slow so disabled by default users can turn on it in the editor setting
Diffstat (limited to 'modules/gdscript/language_server/gdscript_extend_parser.h')
-rw-r--r-- | modules/gdscript/language_server/gdscript_extend_parser.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/gdscript/language_server/gdscript_extend_parser.h b/modules/gdscript/language_server/gdscript_extend_parser.h index a1a2e2c31f..a7e5130e2c 100644 --- a/modules/gdscript/language_server/gdscript_extend_parser.h +++ b/modules/gdscript/language_server/gdscript_extend_parser.h @@ -39,6 +39,10 @@ #define LINE_NUMBER_TO_INDEX(p_line) ((p_line)-1) #endif +#ifndef JOIN_SYMBOLS +#define JOIN_SYMBOLS(p_path, name) ((p_path) + "." + (name)) +#endif + class ExtendGDScriptParser : public GDScriptParser { String path; String code; @@ -70,8 +74,7 @@ public: const lsp::DocumentSymbol *get_symbol_defined_at_line(int p_line) const; const lsp::DocumentSymbol *get_member_symbol(const String &p_name) const; - - void dump_symbols(HashMap<String, lsp::DocumentedSymbolInformation> &r_symbols); + void dump_member_symbols(Map<String, const lsp::DocumentSymbol *> &r_symbols); Error parse(const String &p_code, const String &p_path); }; |