Skip to content

Improve grammar of block expressions #1533

New issue

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

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

Already on GitHub? # to your account

Open
traviscross opened this issue Jul 16, 2024 · 0 comments
Open

Improve grammar of block expressions #1533

traviscross opened this issue Jul 16, 2024 · 0 comments
Labels
A-grammar Area: Syntax and parsing

Comments

@traviscross
Copy link
Contributor

traviscross commented Jul 16, 2024

At some point, we may want to improve the grammar for blocks.

The way that rustc works is that a block is a sequence of statements. It's probably clearer to do something like that here. Then we can just say that "all expressions are statements" and that "a block is a sequence of statements that are delimited by semicolons with an optional trailing semicolon" or something to that effect.

But, of course, we should beware of:

cc @ehuss

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-grammar Area: Syntax and parsing
Projects
None yet
Development

No branches or pull requests

2 participants