Fixed bug where I used the 'lookaroundNumCaptureGroups' member of the wrong State struct

This commit is contained in:
2025-01-09 10:39:04 -06:00
parent 0956dddd81
commit 3f0360b9be

2
nfa.go

@@ -136,7 +136,7 @@ func (s State) checkAssertion(str []rune, idx int) bool {
strToMatch = string(runesToMatch)
}
matchIndices := findAllMatches(Reg{startState, startState.lookaroundNumCaptureGroups}, strToMatch)
matchIndices := findAllMatches(Reg{startState, s.lookaroundNumCaptureGroups}, strToMatch)
numMatchesFound := 0
for _, matchIdx := range matchIndices {