Merge pull request #18531 from KidRigger/issue5972

Adds keywords to autocomplete predictions.
This commit is contained in:
Rémi Verschelde 2018-05-02 10:22:08 +02:00 committed by GitHub
commit fb917b5568
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1522,6 +1522,13 @@ static void _find_identifiers(GDScriptCompletionContext &context, int p_line, bo
result.insert(_type_names[i]);
}
List<String> reserved_words;
GDScriptLanguage::get_singleton()->get_reserved_words(&reserved_words);
for (List<String>::Element *E = reserved_words.front(); E; E = E->next()) {
result.insert(E->get());
}
//autoload singletons
List<PropertyInfo> props;
ProjectSettings::get_singleton()->get_property_list(&props);