Nothing Special   »   [go: up one dir, main page]

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

Layout: bug when layout keyword on new line is followed by layoutOpen "{" #353

Closed
andreasabel opened this issue Apr 9, 2021 · 0 comments
Assignees
Labels
bug layout Concerning layout (keywords)
Milestone

Comments

@andreasabel
Copy link
Member

LBNF file:

P.        Decl ::= "private" "{" [Decl] "}" ;
separator Decl ";" ;

layout "private" ;

Input:

private
  private
  private {}  -- should work

This is reconstructed as

private {
  ; private {}
  private {}  -- missing semicolon
}

The problem is that the following code does not check whether a layoutSep needs to be inserted:

, " -- Explicit layout, just move on. The case above"
, " -- will push an explicit layout block."
, " t1 : _ | isLayoutOpen t1 -> t0 : res (Just t0) st ts"

@andreasabel andreasabel added bug layout Concerning layout (keywords) labels Apr 9, 2021
@andreasabel andreasabel added this to the 2.9.2 milestone Apr 9, 2021
@andreasabel andreasabel self-assigned this Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug layout Concerning layout (keywords)
Projects
None yet
Development

No branches or pull requests

1 participant