Implemented else blocks

This commit is contained in:
Eduard Urbach 2024-07-30 16:36:33 +02:00
parent ff86dfe590
commit e537e543cc
Signed by: eduard
GPG key ID: 49226B848C78F6C8
17 changed files with 118 additions and 25 deletions

View file

@ -39,6 +39,18 @@ func EachInstruction(body token.List, call func(token.List) error) error {
case token.BlockEnd:
blockLevel--
if groupLevel > 0 || blockLevel > 0 {
continue
}
err := call(body[start : i+1])
if err != nil {
return err
}
start = i + 1
}
}