Fixed Kleene Star matching

This commit is contained in:
2024-10-22 17:07:01 -04:00
parent d191686168
commit bc11777ad5
3 changed files with 31 additions and 22 deletions

4
nfa.go
View File

@@ -39,6 +39,6 @@ func verifyLastStatesHelper(state *State, visited map[*State]bool) {
}
// verifyLastStates penables the 'isLast' flag for the leaf nodes (last states)
func verifyLastStates(start []State) {
verifyLastStatesHelper(&start[0], make(map[*State]bool))
func verifyLastStates(start []*State) {
verifyLastStatesHelper(start[0], make(map[*State]bool))
}