Added more tests
This commit is contained in:
parent
35ee40988d
commit
5f7cc9115a
2 changed files with 72 additions and 1 deletions
|
@ -51,10 +51,17 @@ func eachInstruction(tokens token.List, call func(token.List) error) error {
|
|||
}
|
||||
|
||||
start = i + 1
|
||||
|
||||
case token.EOF:
|
||||
if start < i {
|
||||
return call(tokens[start:i])
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
if start != len(tokens) {
|
||||
if start < len(tokens) {
|
||||
return call(tokens[start:])
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue