summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2020-09-25 13:10:36 +0200
committerAndreas Kling <kling@serenityos.org>2020-09-26 00:00:50 +0200
commit84d276dba0d1d6806eace01a4a0cf08aca76be97 (patch)
tree2a68e9a71ef730f6e141bc3134fb8c7d66aec1a3 /AK
parent5b7decc3afd3df6f343c8a57342ec6c45fa4c545 (diff)
downloadserenity-84d276dba0d1d6806eace01a4a0cf08aca76be97.zip
AK: Add GenericLexer::remaining.
This is useful for debugging with printf :^).
Diffstat (limited to 'AK')
-rw-r--r--AK/GenericLexer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/AK/GenericLexer.h b/AK/GenericLexer.h
index 4badf22d72..7f332de5c3 100644
--- a/AK/GenericLexer.h
+++ b/AK/GenericLexer.h
@@ -41,6 +41,8 @@ public:
size_t tell() const { return m_index; }
size_t tell_remaining() const { return m_input.length() - m_index; }
+ StringView remaining() const { return m_input.substring_view(m_index); }
+
bool is_eof() const;
char peek(size_t offset = 0) const;