goose
goose copied to clipboard
Allow continue and break while iterating over a map
In for...range
loops over a map, we should support break
similar to how ordinary for
loops work. The concrete use case is code that finds an arbitrary element in a map for implementing an allocator.
This should reuse the existing code for chaining on an extra ; Continue
when necessary, so we don't have to end every iteration with continue
in Goose. This will also inherit improvements to that code to handle more control flow patterns.