1
Fork 0
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:
Sam Atkins 2021-07-28 16:27:45 +01:00 committed by Andreas Kling
parent 919eb7c0aa
commit d6668dbc56
2 changed files with 3 additions and 3 deletions

View file

@ -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>