File tree Expand file tree Collapse file tree
crates/plotnik-lib/src/compiler/lower/thompson Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -439,13 +439,6 @@ impl NfaBuilder<'_> {
439439 self . ctx . analysis . pattern_facts . pattern_is_nullable ( pattern)
440440 }
441441
442- /// A sequence item that may consume nothing: a skippable quantifier, a
443- /// reference to a nullable definition, a group of such items, or an
444- /// alternation with a nullable alternative.
445- pub ( super ) fn is_skippable_item ( & self , pattern : & Pattern ) -> bool {
446- self . pattern_is_nullable ( pattern)
447- }
448-
449442 /// [`pattern_owns_iteration`] extended to nullable references: the inlined
450443 /// body stands in for the item, so iteration ownership is the body's — a
451444 /// quantifier-rooted body owns its sibling search, and wrapping it in a
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ impl NfaBuilder<'_> {
187187 let first_is_skippable = nav_modes
188188 . first ( )
189189 . and_then ( |( idx, _) | items[ * idx] . as_pattern ( ) )
190- . is_some_and ( |p| self . is_skippable_item ( p) ) ;
190+ . is_some_and ( |p| self . pattern_is_nullable ( p) ) ;
191191 // The skip path makes the follower the new "first" item, so it must re-derive
192192 // first-position navigation rather than the sibling `Next` the match path uses.
193193 // This is required whenever the first item navigates to a position (`Down*` into
@@ -225,7 +225,7 @@ impl NfaBuilder<'_> {
225225 let last_is_skippable = nav_modes
226226 . last ( )
227227 . and_then ( |( idx, _) | items[ * idx] . as_pattern ( ) )
228- . is_some_and ( |p| self . is_skippable_item ( p) ) ;
228+ . is_some_and ( |p| self . pattern_is_nullable ( p) ) ;
229229
230230 // Build chain in reverse: last pattern exits to `exit`, each prior exits to next.
231231 let mut current_exit = exit;
You can’t perform that action at this time.
0 commit comments