mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-01 11:57:19 +02:00
LibWeb: Track the byte offset of an HTMLToken's position
We currently track the [line, column] position of every HTMLToken, as this is what is needed for LibGUI's syntax highlighting. Some non-LibGUI purposes (e.g. highlighting HTML with HTML) require a byte offset. Track both during tokenization.
This commit is contained in:
@@ -37,6 +37,7 @@ public:
|
||||
struct Position {
|
||||
size_t line { 0 };
|
||||
size_t column { 0 };
|
||||
size_t byte_offset { 0 };
|
||||
};
|
||||
|
||||
struct Attribute {
|
||||
|
||||
Reference in New Issue
Block a user