From e0434737b20b32a8d7238a134c3662fa9075eb6d Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 15 Sep 2023 08:15:29 +0200 Subject: feat: add offset to Trace::EndOfFile --- src/tokenizer/machine/utils.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/tokenizer/machine') 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, { + 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) { -- cgit v1.2.3