goose icon indicating copy to clipboard operation
goose copied to clipboard

Allow continue and break while iterating over a map

Open tchajed opened this issue 4 years ago • 0 comments

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.

tchajed avatar May 20 '20 17:05 tchajed