Skip to content

Commit ae64cff

Browse files
AtkinsSJawesomekling
authored andcommitted
LibWeb: Expose token counts from CSS TokenStream
1 parent 8ce38fd commit ae64cff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Userland/Libraries/LibWeb/CSS/Parser/TokenStream.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ class TokenStream {
107107
next_token();
108108
}
109109

110+
size_t token_count() const { return m_tokens.size(); }
111+
size_t remaining_token_count() const { return token_count() - m_iterator_offset - 1; }
112+
110113
void dump_all_tokens()
111114
{
112115
dbgln("Dumping all tokens:");

0 commit comments

Comments
 (0)