Skip to content

adds labeled switch to the grammar.y documentation#23119

Closed
ityonemo wants to merge 3 commits into
ziglang:masterfrom
ityonemo:conform-grammar-y-to-labeled-switch
Closed

adds labeled switch to the grammar.y documentation#23119
ityonemo wants to merge 3 commits into
ziglang:masterfrom
ityonemo:conform-grammar-y-to-labeled-switch

Conversation

@ityonemo

@ityonemo ityonemo commented Mar 6, 2025

Copy link
Copy Markdown
Contributor

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

ityonemo commented Mar 6, 2025

Copy link
Copy Markdown
Contributor Author

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

ityonemo commented Mar 6, 2025

Copy link
Copy Markdown
Contributor Author

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

andrewrk commented Mar 8, 2025

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor Author

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

@ityonemo ityonemo closed this Mar 10, 2025
@ityonemo

Copy link
Copy Markdown
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