mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibWeb: Allow peeking more than 1 token ahead in CSS Parser
This commit is contained in:
parent
919eb7c0aa
commit
d6668dbc56
2 changed files with 3 additions and 3 deletions
|
@ -73,12 +73,12 @@ bool TokenStream<T>::has_next_token()
|
|||
}
|
||||
|
||||
template<typename T>
|
||||
T const& TokenStream<T>::peek_token()
|
||||
T const& TokenStream<T>::peek_token(int offset)
|
||||
{
|
||||
if (!has_next_token())
|
||||
return m_eof;
|
||||
|
||||
return m_tokens.at(m_iterator_offset + 1);
|
||||
return m_tokens.at(m_iterator_offset + offset + 1);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue