Added more tests
This commit is contained in:
parent
8f3fa494ba
commit
4dbfa80939
4 changed files with 44 additions and 28 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue