Added more tests

This commit is contained in:
Eduard Urbach 2025-02-21 11:45:32 +01:00
parent 8f3fa494ba
commit 4dbfa80939
Signed by: eduard
GPG key ID: 49226B848C78F6C8
4 changed files with 44 additions and 28 deletions

View file

@ -9,13 +9,13 @@ func eachInstruction(tokens token.List, call func(token.List) error) error {
blockLevel := 0
for i, t := range tokens {
if start == i && t.Kind == token.NewLine {
start = i + 1
continue
}
switch t.Kind {
case token.NewLine:
if start == i {
start = i + 1
continue
}
if groupLevel > 0 || blockLevel > 0 {
continue
}