Closed Ev1lT3rm1nal closed 1 week ago
I added labelled loops for Zig in https://github.com/skvadrik/re2c/commit/72a7d1b3039fe35ad7797fa7dda5042d1323314f (it hasn't been merged into master
yet, but it will be merged soon). This feature is important for correctness, as it would be quite easy to forget about the hidden loop generated by re2c when enclosing it in an outer user-defined loop. It is possible to suppress label generation by setting re2c:label:yyloop = "";
(e.g. if the Zig toolchain in use doesn't have this feature yet).
This looks awesome! Thank you for updating the library for the upcoming changes.
So, issue https://github.com/ziglang/zig/pull/21257 was closed, adding support for new syntax for labeled
switch/continue
statements, which improves performance (somewhat like computed gotos in C). It would be great if re2c added this feature too, although it is currently in Zig's master branch.