Skip to content

adds labeled switch to the grammar.y documentation #23119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

ityonemo
Copy link
Contributor

@ityonemo ityonemo commented Mar 6, 2025

BlockLabels now also support Switch Expressions for Duff's Device like control flow.

ityonemo added 2 commits March 6, 2025 14:50
This must be separate as otherwise, SwitchExpr can not be followed by dot dereferencing, in the same way that if statements can.
@ityonemo ityonemo marked this pull request as draft March 6, 2025 22:55
@ityonemo
Copy link
Contributor Author

ityonemo commented Mar 6, 2025

looks like there are some major cases still not covered correctly by this change.

@ityonemo ityonemo marked this pull request as ready for review March 6, 2025 23:30
@ityonemo
Copy link
Contributor Author

ityonemo commented Mar 6, 2025

resolved and tested against the zig codebase in e-xyza/zig_parser

@alexrp alexrp requested a review from mlugg March 8, 2025 04:22
@andrewrk
Copy link
Member

andrewrk commented Mar 8, 2025

This data is copy-pasted from https://github.com/ziglang/zig-spec/tree/master/grammar - that's where you should make the PR to

@ityonemo
Copy link
Contributor Author

ok thanks! I was wondering why I couldn't find it.

@ityonemo ityonemo closed this Mar 10, 2025
@ityonemo
Copy link
Contributor Author

new PR here: ziglang/zig-spec#60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants