mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
Sema: reimplement runtime switch
Now supports multiple items pointing to the same body. This is a common pattern even when using a jump table, with multiple cases pointing to the same block of code. In the case of a range specified, the items are moved to branches in the else body. A future improvement may make it possible to have jump table items as well as ranges pointing to the same block of code.
This commit is contained in:
parent
caa0de545e
commit
ea902ffe8f
4 changed files with 240 additions and 188 deletions
Loading…
Add table
Add a link
Reference in a new issue