diff options
Diffstat (limited to 'subex/subexstate.go')
-rw-r--r-- | subex/subexstate.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/subex/subexstate.go b/subex/subexstate.go index 26d7347..4f5dc19 100644 --- a/subex/subexstate.go +++ b/subex/subexstate.go @@ -424,8 +424,7 @@ type SubexIncrementNestState struct { next SubexState } func (state SubexIncrementNestState) epsilon(aux auxiliaryState) []SubexBranch { - aux.nestingLen += 1 - aux.nestingValue = state.keys + aux.nesting = append(aux.nesting, state.keys) return []SubexBranch {{ state: state.next, aux: aux, @@ -439,7 +438,7 @@ type SubexDecrementNestState struct { next SubexState } func (state SubexDecrementNestState) epsilon(aux auxiliaryState) []SubexBranch { - aux.nestingLen -= 1 + aux.nesting = aux.nesting[:len(aux.nesting) - 1] // aux.nestingValue will be set in addStates return []SubexBranch {{ state: state.next, |