5 ms·
I like tokenizers and parsers because they have a certain rhythm to them, and Zig's new labeled switch simplifies state transitions by allowing continue stateme
by simonklee 2y ago
I like tokenizers and parsers because they have a certain rhythm to them, and Zig's new labeled switch simplifies state transitions by allowing continue statements to target specific switch cases. Like computed-gotos in C.
- Zig issue: https://github.com/ziglang/zig/issues/8220 https://github.com/ziglang/zig/issues/8220
- Release notes: https://github.com/ziglang/zig/pull/21257#issuecomment-2336865183 https://github.com/ziglang/zig/pull/21257#issuecomment-23368...