Everywhere: Hoist the Libraries folder to the top-level

This commit is contained in:
Timothy Flynn 2024-11-09 12:25:08 -05:00 committed by Andreas Kling
commit 93712b24bf
Notes: github-actions[bot] 2024-11-10 11:51:52 +00:00
4547 changed files with 104 additions and 113 deletions

View file

@ -0,0 +1,44 @@
/*
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibSyntax/Highlighter.h>
namespace Web::HTML {
enum class AugmentedTokenKind : u32 {
AttributeName,
AttributeValue,
OpenTag,
CloseTag,
Comment,
Doctype,
__Count,
};
class SyntaxHighlighter : public Syntax::Highlighter {
public:
SyntaxHighlighter() = default;
virtual ~SyntaxHighlighter() override = default;
virtual bool is_identifier(u64) const override;
virtual bool is_navigatable(u64) const override;
virtual Syntax::Language language() const override { return Syntax::Language::HTML; }
virtual Optional<StringView> comment_prefix() const override { return "<!--"sv; }
virtual Optional<StringView> comment_suffix() const override { return "-->"sv; }
virtual void rehighlight(Palette const&) override;
static constexpr u64 JS_TOKEN_START_VALUE = 1000;
static constexpr u64 CSS_TOKEN_START_VALUE = 2000;
protected:
virtual Vector<MatchingTokenPair> matching_token_pairs_impl() const override;
virtual bool token_types_equal(u64, u64) const override;
};
}