Implemented array storage

This commit is contained in:
2024-07-20 17:35:26 +02:00
parent d35c07ed1c
commit 155df7c44c
17 changed files with 150 additions and 45 deletions

View File

@ -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)