diff options
| author | JSDurand <mmemmew@gmail.com> | 2023-02-27 12:36:41 +0800 |
|---|---|---|
| committer | JSDurand <mmemmew@gmail.com> | 2023-02-27 12:36:41 +0800 |
| commit | fbaa420ed550e9c3e7cdc09d4a8ec22bfbd782a6 (patch) | |
| tree | fad9722825bb3fa796dd52c3fd4a8bf46b958cf9 /grammar/src/label.rs | |
| parent | afad02bdff111ecccb0077b9c989e869723c231c (diff) | |
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.
Diffstat (limited to 'grammar/src/label.rs')
| -rw-r--r-- | grammar/src/label.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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 { |
