1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +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:
Itamar 2022-05-14 17:09:24 +03:00 committed by Andreas Kling
parent a2c34554cd
commit b35293d945
65 changed files with 685 additions and 491 deletions

View file

@ -27,7 +27,7 @@ public:
virtual Syntax::Language language() const override { return Syntax::Language::Cpp; }
virtual void rehighlight(Palette const&) override;
void update_tokens_info(Vector<GUI::AutocompleteProvider::TokenInfo>);
void update_tokens_info(Vector<CodeComprehension::TokenInfo>);
virtual bool is_cpp_semantic_highlighter() const override { return true; }
@ -36,10 +36,10 @@ protected:
virtual bool token_types_equal(u64 token1, u64 token2) const override { return m_simple_syntax_highlighter.token_types_equal(token1, token2); };
private:
void update_spans(Vector<GUI::AutocompleteProvider::TokenInfo> const&, Gfx::Palette const&);
void update_spans(Vector<CodeComprehension::TokenInfo> const&, Gfx::Palette const&);
Cpp::SyntaxHighlighter m_simple_syntax_highlighter;
Vector<GUI::AutocompleteProvider::TokenInfo> m_tokens_info;
Vector<CodeComprehension::TokenInfo> m_tokens_info;
String m_saved_tokens_text;
Vector<Token> m_saved_tokens;
Threading::Mutex m_lock;