From 7101e0021f6d3d35e87a480c1e1f4cf5ba02803a Mon Sep 17 00:00:00 2001 From: Tao Wu Date: Thu, 1 Dec 2022 02:14:47 +0800 Subject: [PATCH] feat: add method to get current parsing index (#728) --- src/parser.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/parser.rs b/src/parser.rs index 16e728943..393c17a14 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -5930,6 +5930,11 @@ impl<'a> Parser<'a> { } Ok(sequence_options) } + + /// The index of the first unprocessed token. + pub fn index(&self) -> usize { + self.index + } } impl Word {