Fixed incorrect token count

This commit is contained in:
Eduard Urbach 2024-08-01 14:40:47 +02:00
parent e3264ba2e7
commit 03aa384b94
Signed by: eduard
GPG key ID: 49226B848C78F6C8

View file

@ -25,6 +25,7 @@ func Count(body AST, buffer []byte, kind token.Kind, name string) uint8 {
case *If: case *If:
count += node.Condition.Count(buffer, kind, name) count += node.Condition.Count(buffer, kind, name)
count += Count(node.Body, buffer, kind, name) count += Count(node.Body, buffer, kind, name)
count += Count(node.Else, buffer, kind, name)
case *Loop: case *Loop:
count += Count(node.Body, buffer, kind, name) count += Count(node.Body, buffer, kind, name)