Implemented array storage

This commit is contained in:
Eduard Urbach 2024-07-20 17:35:26 +02:00
parent 5dee0777e7
commit 52e87a8885
Signed by: eduard
GPG key ID: 49226B848C78F6C8
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)