summaryrefslogtreecommitdiff
path: root/AK/GenericLexer.h
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2023-02-16 09:49:21 +0330
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2023-02-18 06:55:46 +0330
commit9c61fed37cdbec8ac4f7aa25d46a982a39f8f5a8 (patch)
treeeb9419619cd1cac26e28e633076dcceb5cafa977 /AK/GenericLexer.h
parent7880e11690a520db1011510dfe6c5350b2d8f22c (diff)
downloadserenity-9c61fed37cdbec8ac4f7aa25d46a982a39f8f5a8.zip
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.
Diffstat (limited to 'AK/GenericLexer.h')
-rw-r--r--AK/GenericLexer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/AK/GenericLexer.h b/AK/GenericLexer.h
index ee9a95e787..508c4df3a2 100644
--- a/AK/GenericLexer.h
+++ b/AK/GenericLexer.h
@@ -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(); }