1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:58:11 +00:00

LanguageServers/Cpp: Autocomplete function and struct/class names

This commit is contained in:
Itamar 2021-02-10 21:46:25 +02:00 committed by Andreas Kling
parent e42b9e879c
commit 64c80f6ea4
2 changed files with 8 additions and 0 deletions

View file

@ -143,6 +143,12 @@ Vector<GUI::AutocompleteProvider::Entry> ParserAutoComplete::autocomplete_identi
if (decl.is_variable_or_parameter_declaration()) {
add_name(((Cpp::VariableOrParameterDeclaration&)decl).m_name);
}
if (decl.is_struct_or_class()) {
add_name(((Cpp::StructOrClassDeclaration&)decl).m_name);
}
if (decl.is_function()) {
add_name(((Cpp::FunctionDeclaration&)decl).m_name);
}
}
auto partial_text = document.parser.text_of_node(node);