Skip to content
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

Ensure all precedence rules are covered. #577

Open
ehuss opened this issue Apr 21, 2019 · 0 comments
Open

Ensure all precedence rules are covered. #577

ehuss opened this issue Apr 21, 2019 · 0 comments
Labels
A-grammar Area: Syntax and parsing

Comments

@ehuss
Copy link
Contributor

ehuss commented Apr 21, 2019

I think there are various bits of precedence rules that are not covered in the reference. expressions.md covers most of them, and patterns.md has one precedence rule noted.

I'm not sure what is missing, some that I can think of:

Attribute precedence. #[attr] x = 1; the attribute (I think) goes to the place expression, not the statement. RFC 16 says "Attributes bind tighter than any operator".

I think the way let _ = ||{}(); fails to parse isn't clear to me. The precedence rules just say "closures", but doesn't specify what that encompasses. See rust-lang/rust#55851.

impl precedence in types. This is briefly mentioned in rust-lang/rust#34511. I think there are other various precedence rules in type expressions.

I feel like there are various other precedence rules that are missing, but I can't think of any others right now. Perhaps at some point the gll grammar could inform all the rules?

@ehuss ehuss added the A-grammar Area: Syntax and parsing label Apr 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grammar Area: Syntax and parsing
Projects
None yet
Development

No branches or pull requests

1 participant