nodeFromSymbol()
This commit is contained in:
@@ -50,7 +50,7 @@ func (st State) Clone() *State {
|
||||
|
||||
// Returns old index
|
||||
func (st *State) IncrementSymbol(symbol byte) int {
|
||||
node := st.bySymbol[symbol]
|
||||
node := st.nodeFromSymbol(symbol)
|
||||
node.count++
|
||||
origIndex := node.index
|
||||
|
||||
@@ -85,3 +85,7 @@ func (st State) String() string {
|
||||
|
||||
return strings.Join(strs, ", ")
|
||||
}
|
||||
|
||||
func (st State) nodeFromSymbol(symbol byte) *node {
|
||||
return st.bySymbol[symbol]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user