mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb/HTML: Expose HTML syntax highlighter's token kinds
This will be used for outputting the highlighted document as HTML.
This commit is contained in:
@@ -14,16 +14,6 @@
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
enum class AugmentedTokenKind : u32 {
|
||||
AttributeName,
|
||||
AttributeValue,
|
||||
OpenTag,
|
||||
CloseTag,
|
||||
Comment,
|
||||
Doctype,
|
||||
__Count,
|
||||
};
|
||||
|
||||
bool SyntaxHighlighter::is_identifier(u64 token) const
|
||||
{
|
||||
if (!token)
|
||||
|
||||
@@ -10,6 +10,16 @@
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
enum class AugmentedTokenKind : u32 {
|
||||
AttributeName,
|
||||
AttributeValue,
|
||||
OpenTag,
|
||||
CloseTag,
|
||||
Comment,
|
||||
Doctype,
|
||||
__Count,
|
||||
};
|
||||
|
||||
class SyntaxHighlighter : public Syntax::Highlighter {
|
||||
public:
|
||||
SyntaxHighlighter() = default;
|
||||
|
||||
Reference in New Issue
Block a user