diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/Parser/Token.h')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Token.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Token.h b/Userland/Libraries/LibWeb/CSS/Parser/Token.h index 9c1d945b68..3c906aa166 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Token.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/Token.h @@ -56,6 +56,12 @@ public: Number, }; + struct Position { + size_t line { 0 }; + size_t column { 0 }; + }; + + Type type() const { return m_type; } bool is(Type type) const { return m_type == type; } StringView ident() const @@ -136,6 +142,9 @@ public: String to_debug_string() const; + Position const& start_position() const { return m_start_position; } + Position const& end_position() const { return m_end_position; } + private: Type m_type { Type::Invalid }; @@ -143,6 +152,9 @@ private: StringBuilder m_unit; HashType m_hash_type { HashType::Unrestricted }; NumberType m_number_type { NumberType::Integer }; + + Position m_start_position; + Position m_end_position; }; } |