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

Error recovery for letops #2668

Open
anmonteiro opened this issue Jun 16, 2022 · 3 comments
Open

Error recovery for letops #2668

anmonteiro opened this issue Jun 16, 2022 · 3 comments

Comments

@anmonteiro
Copy link
Member

Parser can't do automatic semicolon insertion (error recovery). Example:

Works:

let x = { 3; } // no semicolon, `refmt` can parse and insert it
let x = { 3; };

Doesn't work:

let+someOp x = { 3; } // no semicolon, `refmt` chokes
let x = { 3; };
@SanderSpies
Copy link
Contributor

The following does parse:

let x = {
  let+foo xx = { x }
  xx
};

while

  let+foo xx = { x };

does not (note the semicolon).

@SanderSpies
Copy link
Contributor

@anmonteiro I'm trying to reproduce this case - but failing to do so.

@anmonteiro
Copy link
Member Author

It might be outdated, but note that letops are expressions, not structure items

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

No branches or pull requests

2 participants