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

Class expression doesn't parse without trailing semicolon #2037

Closed
anmonteiro opened this issue Jul 1, 2018 · 1 comment · Fixed by #2040
Closed

Class expression doesn't parse without trailing semicolon #2037

anmonteiro opened this issue Jul 1, 2018 · 1 comment · Fixed by #2040
Labels
KIND: FEATURE REQUEST Parser parsing reason code into an AST

Comments

@anmonteiro
Copy link
Member

anmonteiro commented Jul 1, 2018

This should be consistent with block declarations.

This parses:

class x = { 
  as self; 
};

this doesn't:

class x = { 
  as self
};
@anmonteiro
Copy link
Member Author

Same for class type syntax:

class type t = {
  open M;
  as 'a
};

@IwanKaramazow IwanKaramazow added Parser parsing reason code into an AST KIND: FEATURE REQUEST labels Jul 1, 2018
anmonteiro added a commit to anmonteiro/reason that referenced this issue Jul 1, 2018
chenglou pushed a commit that referenced this issue Jul 2, 2018
* Parse class exprs and types without trailing semicolon

fixes #2037

* print trailing semicolon for consistency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
KIND: FEATURE REQUEST Parser parsing reason code into an AST
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants