1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 20:17:44 +00:00

LibSQL: Add a syntax highlighter

This commit is contained in:
Dylan Katz 2021-05-08 18:30:18 -07:00 committed by Andreas Kling
parent 5423aba4ef
commit 984b6e08cf
5 changed files with 147 additions and 1 deletions

View file

@ -0,0 +1,28 @@
/*
* Copyright (c) 2021, Dylan Katz <dykatz@uw.edu>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibSyntax/Highlighter.h>
namespace SQL {
class SyntaxHighlighter final : public Syntax::Highlighter {
public:
SyntaxHighlighter() { }
virtual ~SyntaxHighlighter() override;
virtual bool is_identifier(void*) const override;
virtual Syntax::Language language() const override { return Syntax::Language::SQL; }
virtual void rehighlight(const Palette&) override;
protected:
virtual Vector<MatchingTokenPair> matching_token_pairs() const override;
virtual bool token_types_equal(void*, void*) const override;
};
}