Skip to content

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

@andreasabel

Description

@andreasabel

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"

Metadata

Metadata

Assignees

Labels

buglayoutConcerning layout (keywords)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions