From fbaa420ed550e9c3e7cdc09d4a8ec22bfbd782a6 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Mon, 27 Feb 2023 12:36:41 +0800 Subject: before a major refactor I decide to adopt a new approach of recording and updating item derivation forests. Since this affects a lot of things, I decide to commit before the refactor, so that I can create a branch for that refactor. --- grammar/src/label.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'grammar/src/label.rs') diff --git a/grammar/src/label.rs b/grammar/src/label.rs index 058baaf..e3f3422 100644 --- a/grammar/src/label.rs +++ b/grammar/src/label.rs @@ -119,6 +119,12 @@ impl GrammarLabel { self.end } + /// Set the start. + #[inline] + pub fn set_start(&mut self, pos: usize) { + self.start = pos; + } + /// Return the start in the input. #[inline] pub fn start(&self) -> usize { -- cgit v1.2.3-18-g5258