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

LibGUI: Add Javascript syntax highlighter

This commit is contained in:
Oriko 2020-03-13 00:52:03 +02:00 committed by Andreas Kling
parent c02037e944
commit 196352ef67
3 changed files with 181 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#pragma once
#include <LibGUI/SyntaxHighlighter.h>
namespace GUI {
class JSSyntaxHighlighter final : public SyntaxHighlighter {
public:
JSSyntaxHighlighter() {}
virtual ~JSSyntaxHighlighter() override;
virtual bool is_identifier(void*) const override;
virtual bool is_navigatable(void*) const override;
virtual SyntaxLanguage language() const override { return SyntaxLanguage::Javascript; }
virtual void rehighlight() override;
protected:
virtual Vector<MatchingTokenPair> matching_token_pairs() const override;
virtual bool token_types_equal(void*, void*) const override;
};
}