Updated references to 'epsilon'

This commit is contained in:
2025-01-30 10:38:26 -05:00
parent 7aee4280cc
commit be60f2fb51
2 changed files with 5 additions and 5 deletions

View File

@@ -63,8 +63,8 @@ func (g Group) isValid() bool {
// If a state begins or ends a capturing group, its 'thread' is updated to contain the correct index.
func takeZeroState(states []*nfaState, numGroups int, idx int) (rtv []*nfaState, isZero bool) {
for _, state := range states {
if len(state.transitions[EPSILON]) > 0 {
for _, s := range state.transitions[EPSILON] {
if len(state.transitions[epsilon]) > 0 {
for _, s := range state.transitions[epsilon] {
if s.threadGroups == nil {
s.threadGroups = newMatch(numGroups + 1)
}
@@ -78,7 +78,7 @@ func takeZeroState(states []*nfaState, numGroups int, idx int) (rtv []*nfaState,
// closeParenGroups = append(closeParenGroups, s.groupNum)
}
}
rtv = append(rtv, state.transitions[EPSILON]...)
rtv = append(rtv, state.transitions[epsilon]...)
}
}
for _, state := range rtv {