mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Auto completion enhanced for extends and class level identifier
This commit is contained in:
parent
72d12289bb
commit
d53f5b55ec
3 changed files with 60 additions and 3 deletions
|
@ -3575,6 +3575,14 @@ void GDScriptParser::_parse_extends(ClassNode *p_class) {
|
|||
|
||||
case GDScriptTokenizer::TK_IDENTIFIER: {
|
||||
|
||||
completion_type = COMPLETION_EXTENDS;
|
||||
completion_class = current_class;
|
||||
completion_function = current_function;
|
||||
completion_line = tokenizer->get_token_line();
|
||||
completion_block = current_block;
|
||||
completion_ident_is_call = false;
|
||||
completion_found = true;
|
||||
|
||||
StringName identifier = tokenizer->get_token_identifier();
|
||||
p_class->extends_class.push_back(identifier);
|
||||
} break;
|
||||
|
@ -5371,6 +5379,16 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
|
|||
|
||||
default: {
|
||||
|
||||
if (token == GDScriptTokenizer::TK_IDENTIFIER) {
|
||||
completion_type = COMPLETION_IDENTIFIER;
|
||||
completion_class = current_class;
|
||||
completion_function = current_function;
|
||||
completion_line = tokenizer->get_token_line();
|
||||
completion_block = current_block;
|
||||
completion_ident_is_call = false;
|
||||
completion_found = true;
|
||||
}
|
||||
|
||||
_set_error(String() + "Unexpected token: " + tokenizer->get_token_name(tokenizer->get_token()) + ":" + tokenizer->get_token_identifier());
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue