File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Sources/_StringProcessing/Regex Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,12 @@ extension DSLList {
180180 case . orderedChoice, . conditional:
181181 return . some( nil )
182182
183- // Groups (and other parent nodes) defer to the child.
183+ // A negative lookahead rules out the existence of a safe required
184+ // character.
185+ case . nonCapturingGroup( let kind, _) where kind. isNegativeLookahead:
186+ return . some( nil )
187+
188+ // Other groups (and other parent nodes) defer to the child.
184189 case . nonCapturingGroup, . capture,
185190 . ignoreCapturesInTypedOutput,
186191 . limitCaptureNesting:
@@ -208,7 +213,6 @@ extension DSLList {
208213 return _requiredAtomImpl ( & position) ?? nil
209214 }
210215
211-
212216 internal mutating func autoPossessifyNextQuantification( _ position: inout Int ) -> ( Int , DSLTree . Atom ) ? {
213217 guard position < nodes. count else {
214218 return nil
You can’t perform that action at this time.
0 commit comments