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

Parse expr disallowing structs #515

Closed
utkarshkukreti opened this issue Oct 17, 2018 · 1 comment · Fixed by #848
Closed

Parse expr disallowing structs #515

utkarshkukreti opened this issue Oct 17, 2018 · 1 comment · Fixed by #848

Comments

@utkarshkukreti
Copy link
Contributor

Hi, is there any way to call this function from the public API of syn?

I want to parse a Rust's for-like expression and using the normal Expr parser fails on for x in y {} as it thinks that y {} is a struct expression.

@dtolnay
Copy link
Owner

dtolnay commented Oct 17, 2018

This is not currently supported. I would be prepared to consider a PR that exposes it as something like Expr::parse_without_eager_brace (documented with explanation and realistic example).

@dtolnay dtolnay changed the title Parsing expr disallowing structs? Parse expr disallowing structs Dec 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants