mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 18:15:58 +00:00
AK: Add an input() accessor to GenericLexer
It's sometimes useful to get the input from the lexer instead of wiring it all the way down to where it's needed.
This commit is contained in:
parent
7880e11690
commit
9c61fed37c
|
@ -22,6 +22,7 @@ public:
|
|||
constexpr size_t tell_remaining() const { return m_input.length() - m_index; }
|
||||
|
||||
StringView remaining() const { return m_input.substring_view(m_index); }
|
||||
StringView input() const { return m_input; }
|
||||
|
||||
constexpr bool is_eof() const { return m_index >= m_input.length(); }
|
||||
|
||||
|
|
Loading…
Reference in a new issue