aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-09-15 08:15:29 +0200
committerMartin Fischer <martin@push-f.com>2023-09-28 10:36:08 +0200
commite0434737b20b32a8d7238a134c3662fa9075eb6d (patch)
tree8fbfc1fa768fead46a425a1c51970338517ed695 /src/tokenizer
parentd913e6e91e43241b0105afbbad7db5c5bcda0255 (diff)
feat: add offset to Trace::EndOfFile
Diffstat (limited to 'src/tokenizer')
-rw-r--r--src/tokenizer/machine/utils.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tokenizer/machine/utils.rs b/src/tokenizer/machine/utils.rs
index ea4d697..9752746 100644
--- a/src/tokenizer/machine/utils.rs
+++ b/src/tokenizer/machine/utils.rs
@@ -13,6 +13,10 @@ where
O: Offset,
E: Emitter<O>,
{
+ pub(crate) fn reader_position(&self) -> O {
+ self.reader.position()
+ }
+
/// Emits the given character as a character token.
#[inline]
pub(super) fn emit_char(&mut self, c: char) {