mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
LibWeb: Add TokenStream class to CSS Parser
The entry points for CSS parsing in the spec are defined as accepting any of a stream of Tokens, or a stream of ComponentValues, or a String. TokenStream is an attempt to reduce the duplication of code for that.
This commit is contained in:
parent
6c03123b2d
commit
b7116711bf
4 changed files with 119 additions and 47 deletions
|
@ -70,6 +70,8 @@ public:
|
|||
|
||||
[[nodiscard]] Vector<Token> parse();
|
||||
|
||||
[[nodiscard]] static Token create_eof_token();
|
||||
|
||||
private:
|
||||
[[nodiscard]] u32 next_code_point();
|
||||
[[nodiscard]] u32 peek_code_point(size_t offset = 0) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue