Skip to content

Commit

Permalink
Merge pull request godotengine#37232 from ThakeeNathees/load()-autoco…
Browse files Browse the repository at this point in the history
…mplete-imlpemented

autocomplete for load() function implemented
  • Loading branch information
akien-mga authored Apr 24, 2020
2 parents 85ed2ed + d2664a0 commit 514fb5f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/gdscript/gdscript_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 514fb5f

Please sign in to comment.