Implemented array storage
This commit is contained in:
parent
5dee0777e7
commit
52e87a8885
17 changed files with 150 additions and 45 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue