Implemented array storage
This commit is contained in:
@ -9,11 +9,7 @@ func Count(body AST, kind token.Kind, name string) int {
|
||||
for _, node := range body {
|
||||
switch node := node.(type) {
|
||||
case *Assign:
|
||||
if node.Name.Kind == kind && node.Name.Text() == name {
|
||||
count++
|
||||
}
|
||||
|
||||
count += node.Value.Count(kind, name)
|
||||
count += node.Expression.Count(kind, name)
|
||||
|
||||
case *Call:
|
||||
count += node.Expression.Count(kind, name)
|
||||
|
Reference in New Issue
Block a user