Merge pull request #41451 from ThakeeNathees/autocompletion-in-comment-bug

autocompletion inside comments bug fixed
This commit is contained in:
Rémi Verschelde 2020-08-24 01:09:48 +02:00 committed by GitHub
commit c5abc57f8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 10 deletions

View File

@ -3574,15 +3574,6 @@ void GDScriptParser::_parse_extends(ClassNode *p_class) {
switch (tokenizer->get_token()) {
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;
@ -3604,7 +3595,15 @@ void GDScriptParser::_parse_extends(ClassNode *p_class) {
case GDScriptTokenizer::TK_IDENTIFIER:
case GDScriptTokenizer::TK_PERIOD:
continue;
case GDScriptTokenizer::TK_CURSOR:
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;
return;
default:
return;
}