You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
-added new code completion guess locations, closes #1032
-moved commandline fix to mingw-only, should fix #1064
This commit is contained in:
@@ -2027,14 +2027,20 @@ void GDParser::_parse_class(ClassNode *p_class) {
|
||||
}
|
||||
|
||||
|
||||
if (tokenizer->get_token(1)!=GDTokenizer::TK_IDENTIFIER) {
|
||||
tokenizer->advance();
|
||||
StringName name;
|
||||
|
||||
if (_get_completable_identifier(COMPLETION_VIRTUAL_FUNC,name)) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (name==StringName()) {
|
||||
|
||||
_set_error("Expected identifier after 'func' (syntax: 'func <identifier>([arguments]):' ).");
|
||||
return;
|
||||
}
|
||||
|
||||
StringName name = tokenizer->get_token_identifier(1);
|
||||
|
||||
for(int i=0;i<p_class->functions.size();i++) {
|
||||
if (p_class->functions[i]->name==name) {
|
||||
_set_error("Function '"+String(name)+"' already exists in this class (at line: "+itos(p_class->functions[i]->line)+").");
|
||||
@@ -2045,7 +2051,7 @@ void GDParser::_parse_class(ClassNode *p_class) {
|
||||
_set_error("Function '"+String(name)+"' already exists in this class (at line: "+itos(p_class->static_functions[i]->line)+").");
|
||||
}
|
||||
}
|
||||
tokenizer->advance(2);
|
||||
|
||||
|
||||
if (tokenizer->get_token()!=GDTokenizer::TK_PARENTHESIS_OPEN) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user