<NME> Comments.txt
<BEF> Elm File
  PsiComment(LINE_COMMENT)('-- this is a line comment')
  PsiWhiteSpace('\n')
  PsiWhiteSpace('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('n')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiWhiteSpace(' ')
    ElmNumberConstantExpr(NUMBER_CONSTANT_EXPR)
      PsiElement(NUMBER_LITERAL)('42')
  PsiWhiteSpace(' ')
  PsiComment(LINE_COMMENT)('-- this is also a line comment')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiComment(LINE_COMMENT)('-- this is also a line comment')
  PsiWhiteSpace('\n')
  PsiWhiteSpace('\n')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiComment(START_COMMENT)('{-')
  PsiComment(COMMENT_CONTENT)(' this is a block comment.\nIt can span multiple lines\n')
  PsiComment(END_COMMENT)('-}')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiWhiteSpace(' ')
    ElmNumberConstantExpr(NUMBER_CONSTANT_EXPR)
      PsiElement(NUMBER_LITERAL)('42')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiWhiteSpace('\n')
  PsiComment(BLOCK_COMMENT)('{- block comments can also be on a single line -}')
  PsiWhiteSpace('\n')
      ElmListOfOperands(LIST_OF_OPERANDS)
        PsiElement(NUMBER_LITERAL)('42')
  PsiWhiteSpace('\n')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiComment(START_COMMENT)('{-')
  PsiComment(COMMENT_CONTENT)(' block comments can also be on a single line ')
  PsiComment(END_COMMENT)('-}')
      PsiElement(NUMBER_LITERAL)('99')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiWhiteSpace('\n')
  PsiComment(BLOCK_COMMENT)('{- block comments can be\n    {- nested -}\nlike this\n-}')
  PsiWhiteSpace('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('baz')
    PsiWhiteSpace(' ')
      ElmListOfOperands(LIST_OF_OPERANDS)
        PsiElement(NUMBER_LITERAL)('99')
  PsiWhiteSpace('\n')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiComment(START_COMMENT)('{-')
  PsiComment(COMMENT_CONTENT)(' block comments can be\n    ')
  PsiComment(COMMENT_CONTENT)('{-')
  PsiComment(DOC_COMMENT)('{-| this is a doc comment.\nIt can span multiple lines\n-}')
  PsiWhiteSpace('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('foo2')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiWhiteSpace(' ')
    ElmNumberConstantExpr(NUMBER_CONSTANT_EXPR)
      PsiElement(NUMBER_LITERAL)('42')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiWhiteSpace('\n')
  PsiComment(DOC_COMMENT)('{-| doc comments can also be on a single line -}')
  PsiWhiteSpace('\n')
        PsiElement(NUMBER_LITERAL)('0')
  PsiWhiteSpace('\n')
  PsiWhiteSpace('\n')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiComment(START_DOC_COMMENT)('{-|')
  PsiComment(COMMENT_CONTENT)(' this is a doc comment.\nIt can span multiple lines\n')
  PsiComment(END_COMMENT)('-}')
      PsiElement(NUMBER_LITERAL)('99')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiWhiteSpace('\n')
  PsiComment(DOC_COMMENT)('{-| doc comments can contain block comments\n    {- nested -}\nand everything is still ok\n-}')
  PsiWhiteSpace('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('baz2')
    PsiWhiteSpace(' ')
      ElmListOfOperands(LIST_OF_OPERANDS)
        PsiElement(NUMBER_LITERAL)('42')
  PsiWhiteSpace('\n')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiComment(START_DOC_COMMENT)('{-|')
  PsiComment(COMMENT_CONTENT)(' doc comments can also be on a single line ')
  PsiComment(END_COMMENT)('-}')
      ElmListOfOperands(LIST_OF_OPERANDS)
        PsiElement(NUMBER_LITERAL)('99')
  PsiWhiteSpace('\n')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiComment(START_DOC_COMMENT)('{-|')
  PsiComment(COMMENT_CONTENT)(' doc comments can contain block comments\n    ')
  PsiComment(COMMENT_CONTENT)('{-')

<MSG> Cleanup some of the comment mess and port the layout lexer to Kotlin

<DFF> @@ -16,7 +16,7 @@ Elm File
   PsiComment(LINE_COMMENT)('-- this is also a line comment')
   PsiWhiteSpace('\n')
   PsiWhiteSpace('\n')
-  PsiElement(VIRTUAL_END_DECL)('\n')
+  PsiWhiteSpace('\n')
   PsiComment(START_COMMENT)('{-')
   PsiComment(COMMENT_CONTENT)(' this is a block comment.\nIt can span multiple lines\n')
   PsiComment(END_COMMENT)('-}')
@@ -32,7 +32,7 @@ Elm File
       ElmListOfOperands(LIST_OF_OPERANDS)
         PsiElement(NUMBER_LITERAL)('42')
   PsiWhiteSpace('\n')
-  PsiElement(VIRTUAL_END_DECL)('\n')
+  PsiWhiteSpace('\n')
   PsiComment(START_COMMENT)('{-')
   PsiComment(COMMENT_CONTENT)(' block comments can also be on a single line ')
   PsiComment(END_COMMENT)('-}')
@@ -48,7 +48,7 @@ Elm File
       ElmListOfOperands(LIST_OF_OPERANDS)
         PsiElement(NUMBER_LITERAL)('99')
   PsiWhiteSpace('\n')
-  PsiElement(VIRTUAL_END_DECL)('\n')
+  PsiWhiteSpace('\n')
   PsiComment(START_COMMENT)('{-')
   PsiComment(COMMENT_CONTENT)(' block comments can be\n    ')
   PsiComment(COMMENT_CONTENT)('{-')
@@ -69,7 +69,7 @@ Elm File
         PsiElement(NUMBER_LITERAL)('0')
   PsiWhiteSpace('\n')
   PsiWhiteSpace('\n')
-  PsiElement(VIRTUAL_END_DECL)('\n')
+  PsiWhiteSpace('\n')
   PsiComment(START_DOC_COMMENT)('{-|')
   PsiComment(COMMENT_CONTENT)(' this is a doc comment.\nIt can span multiple lines\n')
   PsiComment(END_COMMENT)('-}')
@@ -85,7 +85,7 @@ Elm File
       ElmListOfOperands(LIST_OF_OPERANDS)
         PsiElement(NUMBER_LITERAL)('42')
   PsiWhiteSpace('\n')
-  PsiElement(VIRTUAL_END_DECL)('\n')
+  PsiWhiteSpace('\n')
   PsiComment(START_DOC_COMMENT)('{-|')
   PsiComment(COMMENT_CONTENT)(' doc comments can also be on a single line ')
   PsiComment(END_COMMENT)('-}')
@@ -101,7 +101,7 @@ Elm File
       ElmListOfOperands(LIST_OF_OPERANDS)
         PsiElement(NUMBER_LITERAL)('99')
   PsiWhiteSpace('\n')
-  PsiElement(VIRTUAL_END_DECL)('\n')
+  PsiWhiteSpace('\n')
   PsiComment(START_DOC_COMMENT)('{-|')
   PsiComment(COMMENT_CONTENT)(' doc comments can contain block comments\n    ')
   PsiComment(COMMENT_CONTENT)('{-')

Cleanup some of the comment mess and port the layout lexer to Kotlin