Reduced memory usage
This commit is contained in:
@ -3,8 +3,8 @@ package ast
|
||||
import "git.akyoto.dev/cli/q/src/build/token"
|
||||
|
||||
// Count counts how often the given token appears in the AST.
|
||||
func Count(body AST, buffer []byte, kind token.Kind, name string) int {
|
||||
count := 0
|
||||
func Count(body AST, buffer []byte, kind token.Kind, name string) uint8 {
|
||||
count := uint8(0)
|
||||
|
||||
for _, node := range body {
|
||||
switch node := node.(type) {
|
||||
|
Reference in New Issue
Block a user