From d4f9e3d87f5ccc47a62b725b622b15c0cbed3cbb Mon Sep 17 00:00:00 2001 From: Tao Wu Date: Mon, 28 Nov 2022 10:25:28 +0800 Subject: [PATCH] feat: add method to get current parsing index --- src/parser.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/parser.rs b/src/parser.rs index 8361e02ad..859e1ff76 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -5775,6 +5775,11 @@ impl<'a> Parser<'a> { } Ok(sequence_options) } + + /// The index of the first unprocessed token. + pub fn index(&self) -> usize { + self.index + } } impl Word {