ladybird/Userland/Libraries/LibGUI/GitCommitSyntaxHighlighter.h
Brian Gianforcaro 8e8d24fe29 LibGUI: Add a GitCommit SyntaxHighlighter implementation
This highlighter just syntax highlights the commented lines in your git
commit message. It could potentially be enhanced to handle the rebase
UI or other more advanced cases in the future.
2022-01-18 09:01:16 +01:00

26 lines
663 B
C++

/*
* Copyright (c) 2022, Brian Gianforcaro <bgianf@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibSyntax/Highlighter.h>
namespace GUI {
class GitCommitSyntaxHighlighter final : public Syntax::Highlighter {
public:
GitCommitSyntaxHighlighter() { }
virtual ~GitCommitSyntaxHighlighter() override;
virtual Syntax::Language language() const override { return Syntax::Language::GitCommit; }
virtual void rehighlight(Palette const&) override;
protected:
virtual Vector<MatchingTokenPair> matching_token_pairs_impl() const override;
virtual bool token_types_equal(u64, u64) const override;
};
}