diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-04-24 17:24:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 17:24:23 +0200 |
commit | 514fb5fa8a3f0e81a760a46741c123789696c28b (patch) | |
tree | 3fa2aa217146e809b13cda5791e2b8d4813141db | |
parent | 85ed2edc0685b7868813ee53d14964af9158eaf2 (diff) | |
parent | d2664a0ff1bc43adeacc6e2a1a3ce0ba6846731e (diff) |
Merge pull request #37232 from ThakeeNathees/load()-autocomplete-imlpemented
autocomplete for load() function implemented
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index a83416375c..3e0415ee11 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -746,6 +746,13 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s if (tokenizer->get_token() == GDScriptTokenizer::TK_CURSOR) { _make_completable_call(0); completion_node = op; + + if (op->arguments[0]->type == GDScriptParser::Node::Type::TYPE_BUILT_IN_FUNCTION) { + BuiltInFunctionNode *bn = static_cast<BuiltInFunctionNode *>(op->arguments[0]); + if (bn->function == GDScriptFunctions::Function::RESOURCE_LOAD) { + completion_type = COMPLETION_RESOURCE_PATH; + } + } } if (!replaced) { if (!_parse_arguments(op, op->arguments, p_static, true, p_parsing_constant)) |