`break` works but `continue` doesn't exist yet. Without it you end up nesting the rest of your loop body inside an `if`:
```
for i = 0, n {
if should_skip(i) {
// have to nest everything here
process(i)
do_more(i)
}
}
```
With `continue` that becomes:
```
for i = 0, n {
if should_skip(i) { continue }
process(i)
do_more(i)
}
```
Lua doesn't have `continue` natively but it can be lowered to `goto` — the same way most languages that compile to Lua handle it. Should be a straightforward addition to the parser and codegen.
`break` works but `continue` doesn't exist yet. Without it you end up nesting the rest of your loop body inside an `if`:
```
for i = 0, n {
if should_skip(i) {
// have to nest everything here
process(i)
do_more(i)
}
}
```
With `continue` that becomes:
```
for i = 0, n {
if should_skip(i) { continue }
process(i)
do_more(i)
}
```
Lua doesn't have `continue` natively but it can be lowered to `goto` — the same way most languages that compile to Lua handle it. Should be a straightforward addition to the parser and codegen.