mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibCodeComprehension: Re-organize code comprehension related code
This moves all code comprehension-related code to a new library, LibCodeComprehension. This also moves some types related to code comprehension tasks (such as autocomplete, find declaration) out of LibGUI and into LibCodeComprehension.
This commit is contained in:
parent
a2c34554cd
commit
b35293d945
65 changed files with 685 additions and 491 deletions
|
@ -22,13 +22,13 @@ class LocatorSuggestionModel final : public GUI::Model {
|
|||
public:
|
||||
struct Suggestion {
|
||||
static Suggestion create_filename(String const& filename);
|
||||
static Suggestion create_symbol_declaration(const GUI::AutocompleteProvider::Declaration&);
|
||||
static Suggestion create_symbol_declaration(CodeComprehension::Declaration const&);
|
||||
|
||||
bool is_filename() const { return as_filename.has_value(); }
|
||||
bool is_symbol_declaration() const { return as_symbol_declaration.has_value(); }
|
||||
|
||||
Optional<String> as_filename;
|
||||
Optional<GUI::AutocompleteProvider::Declaration> as_symbol_declaration;
|
||||
Optional<CodeComprehension::Declaration> as_symbol_declaration;
|
||||
};
|
||||
|
||||
explicit LocatorSuggestionModel(Vector<Suggestion>&& suggestions)
|
||||
|
@ -88,7 +88,7 @@ LocatorSuggestionModel::Suggestion LocatorSuggestionModel::Suggestion::create_fi
|
|||
s.as_filename = filename;
|
||||
return s;
|
||||
}
|
||||
LocatorSuggestionModel::Suggestion LocatorSuggestionModel::Suggestion::create_symbol_declaration(const GUI::AutocompleteProvider::Declaration& decl)
|
||||
LocatorSuggestionModel::Suggestion LocatorSuggestionModel::Suggestion::create_symbol_declaration(CodeComprehension::Declaration const& decl)
|
||||
{
|
||||
LocatorSuggestionModel::Suggestion s;
|
||||
s.as_symbol_declaration = decl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue