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