mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
bb8e65be41
This patch introduces the GUI::SyntaxHighlighter class, which can be attached to a GUI::TextEditor to provide syntax highlighting. The C++ syntax highlighting from HackStudio becomes a new class called GUI::CppSyntaxHighlighter. This will make it possible to get C++ syntax highlighting in any app that uses a GUI::TextEditor. :^) Sidenote: It does feel a bit weird having a C++ lexer in a GUI toolkit library, and we'll probably end up moving this out to a separate place as this functionality grows larger.
16 lines
323 B
C++
16 lines
323 B
C++
#pragma once
|
|
|
|
#include <LibGUI/SyntaxHighlighter.h>
|
|
|
|
namespace GUI {
|
|
|
|
class CppSyntaxHighlighter final : public SyntaxHighlighter {
|
|
public:
|
|
CppSyntaxHighlighter() {}
|
|
|
|
virtual ~CppSyntaxHighlighter() override;
|
|
virtual void rehighlight() override;
|
|
virtual void highlight_matching_token_pair() override;
|
|
};
|
|
|
|
}
|