diff options
author | Thakee Nathees <thakeenathees@gmail.com> | 2020-03-22 22:21:34 +0530 |
---|---|---|
committer | Thakee Nathees <thakeenathees@gmail.com> | 2020-03-22 22:21:34 +0530 |
commit | d2664a0ff1bc43adeacc6e2a1a3ce0ba6846731e (patch) | |
tree | f29454a107076030ea66f2638478ceb72545936a | |
parent | 7acdf74a6a87c5a2e91b13a5060ae5ba9d4438a1 (diff) |
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 7fcb2cc423..ad6124437d 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)) |