We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afeb043 commit 6301790Copy full SHA for 6301790
command.go
@@ -90,23 +90,19 @@ func (c *Context) commands() iter.Seq[*command] {
90
}
91
92
cmd := c.commandList[0]
93
- loop:
94
- for {
95
- for cmd.idx < len(c.commandList) {
96
- if cmd.typ != commandJump {
97
- if !yield(cmd) {
98
- return
99
- }
100
- cmd = c.commandList[cmd.idx+1]
101
- continue loop
102
103
- idx := cmd.jump.dstIdx
104
- if idx > len(c.commandList)-1 {
+ for cmd.idx < len(c.commandList) {
+ if cmd.typ != commandJump {
+ if !yield(cmd) {
105
return
106
107
- cmd = c.commandList[idx]
+ cmd = c.commandList[cmd.idx+1]
+ continue
108
109
+ idx := cmd.jump.dstIdx
+ if idx > len(c.commandList)-1 {
+ return
+ }
+ cmd = c.commandList[idx]
110
111
112
0 commit comments