Implemented else blocks
This commit is contained in:
parent
ff86dfe590
commit
e537e543cc
17 changed files with 118 additions and 25 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue