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

Improvements to layout rule #1179

Closed
yav opened this issue Apr 23, 2021 · 1 comment
Closed

Improvements to layout rule #1179

yav opened this issue Apr 23, 2021 · 1 comment
Labels
parser Issues with lexing or parsing.

Comments

@yav
Copy link
Member

yav commented Apr 23, 2021

The current layout algorithm rejects the following program:

module A where
private
z = 0x2

with this error:

Parse error at test.cry:3:2,
  unexpected: layout block separator
  expected: a declaration

The issue is that after private we need to do 2 things: start a new block at the next token (because of private) or insert ; because z is on the indentation block start by where. Currently we seem to be preferring the latter, but I think we should prioritize starting a new block, before inserting a ;

@yav yav added the parser Issues with lexing or parsing. label Apr 23, 2021
@yav
Copy link
Member Author

yav commented May 27, 2021

This should be fixed now

@yav yav closed this as completed May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Issues with lexing or parsing.
Projects
None yet
Development

No branches or pull requests

1 participant