<NME> FieldAccessors.txt
<BEF> Elm File
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('f1')
      PsiWhiteSpace(' ')
      ElmLowerPattern(LOWER_PATTERN)
        PsiElement(LOWER_CASE_IDENTIFIER)('x')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiWhiteSpace(' ')
    ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
      ElmValueExpr(VALUE_EXPR)
        ElmValueQID(VALUE_QID)
          PsiElement(LOWER_CASE_IDENTIFIER)('x')
      PsiElement(DOT)('.')
      PsiErrorElement:<expr> or LOWER_CASE_IDENTIFIER expected
        <empty list>
  PsiElement(VIRTUAL_END_DECL)('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('f2')
      PsiWhiteSpace(' ')
      ElmLowerPattern(LOWER_PATTERN)
        PsiElement(LOWER_CASE_IDENTIFIER)('x')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiWhiteSpace(' ')
    ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
      ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
        ElmValueExpr(VALUE_EXPR)
          ElmValueQID(VALUE_QID)
            PsiElement(LOWER_CASE_IDENTIFIER)('x')
        PsiElement(DOT)('.')
        PsiElement(LOWER_CASE_IDENTIFIER)('bar')
      PsiElement(DOT)('.')
      PsiErrorElement:<expr> or LOWER_CASE_IDENTIFIER expected
        <empty list>
  PsiElement(VIRTUAL_END_DECL)('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('f3')
      PsiWhiteSpace(' ')
      ElmLowerPattern(LOWER_PATTERN)
        PsiElement(LOWER_CASE_IDENTIFIER)('x')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiWhiteSpace(' ')
    ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
      ElmValueExpr(VALUE_EXPR)
        ElmValueQID(VALUE_QID)
          PsiElement(UPPER_CASE_IDENTIFIER)('Foo')
          PsiElement(DOT)('.')
          PsiElement(LOWER_CASE_IDENTIFIER)('bar')
      PsiElement(DOT)('.')
      PsiErrorElement:<expr> or LOWER_CASE_IDENTIFIER expected
        <empty list>
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiWhiteSpace('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('p1')
      PsiWhiteSpace(' ')
      ElmLowerPattern(LOWER_PATTERN)
        PsiElement(LOWER_CASE_IDENTIFIER)('x')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiWhiteSpace(' ')
    ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
      ElmParenthesizedExpr(PARENTHESIZED_EXPR)
        PsiElement(LEFT_PARENTHESIS)('(')
        ElmFunctionCallExpr(FUNCTION_CALL_EXPR)
          ElmValueExpr(VALUE_EXPR)
            ElmValueQID(VALUE_QID)
              PsiElement(LOWER_CASE_IDENTIFIER)('foo')
          PsiWhiteSpace(' ')
          ElmValueExpr(VALUE_EXPR)
            ElmValueQID(VALUE_QID)
              PsiElement(LOWER_CASE_IDENTIFIER)('x')
        PsiElement(RIGHT_PARENTHESIS)(')')
      PsiElement(DOT)('.')
      PsiErrorElement:<expr> or LOWER_CASE_IDENTIFIER expected
        <empty list>
  PsiElement(VIRTUAL_END_DECL)('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('p2')
      PsiWhiteSpace(' ')
      ElmLowerPattern(LOWER_PATTERN)
        PsiElement(LOWER_CASE_IDENTIFIER)('x')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiWhiteSpace(' ')
    ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
      ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
        ElmParenthesizedExpr(PARENTHESIZED_EXPR)
          PsiElement(LEFT_PARENTHESIS)('(')
          ElmFunctionCallExpr(FUNCTION_CALL_EXPR)
            ElmValueExpr(VALUE_EXPR)
              ElmValueQID(VALUE_QID)
                PsiElement(LOWER_CASE_IDENTIFIER)('foo')
            PsiWhiteSpace(' ')
            ElmValueExpr(VALUE_EXPR)
              ElmValueQID(VALUE_QID)
                PsiElement(LOWER_CASE_IDENTIFIER)('x')
          PsiElement(RIGHT_PARENTHESIS)(')')
        PsiElement(DOT)('.')
        PsiElement(LOWER_CASE_IDENTIFIER)('bar')
      PsiElement(DOT)('.')
      PsiErrorElement:<expr> or LOWER_CASE_IDENTIFIER expected
        <empty list>
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiWhiteSpace('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('r1')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiWhiteSpace(' ')
    ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
      ElmRecordExpr(RECORD_EXPR)
        PsiElement(LEFT_BRACE)('{')
        ElmField(FIELD)
          PsiElement(LOWER_CASE_IDENTIFIER)('x')
          PsiElement(EQ)('=')
          ElmNumberConstantExpr(NUMBER_CONSTANT_EXPR)
            PsiElement(NUMBER_LITERAL)('2')
        PsiElement(RIGHT_BRACE)('}')
      PsiElement(DOT)('.')
      PsiErrorElement:LOWER_CASE_IDENTIFIER expected
        <empty list>
  PsiElement(VIRTUAL_END_DECL)('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('r2')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiWhiteSpace(' ')
    ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
      ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
        ElmRecordExpr(RECORD_EXPR)
          PsiElement(LEFT_BRACE)('{')
          ElmField(FIELD)
            PsiElement(LOWER_CASE_IDENTIFIER)('x')
            PsiElement(EQ)('=')
            ElmRecordExpr(RECORD_EXPR)
              PsiElement(LEFT_BRACE)('{')
              ElmField(FIELD)
                PsiElement(LOWER_CASE_IDENTIFIER)('y')
                PsiElement(EQ)('=')
                ElmNumberConstantExpr(NUMBER_CONSTANT_EXPR)
                  PsiElement(NUMBER_LITERAL)('2')
              PsiElement(RIGHT_BRACE)('}')
          PsiElement(RIGHT_BRACE)('}')
        PsiElement(DOT)('.')
        PsiElement(LOWER_CASE_IDENTIFIER)('x')
      PsiElement(DOT)('.')
      PsiErrorElement:LOWER_CASE_IDENTIFIER expected
        <empty list>

<MSG> Support references to record fields in annotated functions (#459)


<DFF> @@ -8,57 +8,77 @@ Elm File
     PsiWhiteSpace(' ')
     PsiElement(EQ)('=')
     PsiWhiteSpace(' ')
+    ElmValueExpr(VALUE_EXPR)
+      ElmValueQID(VALUE_QID)
+        PsiElement(LOWER_CASE_IDENTIFIER)('x')
+  PsiErrorElement:<expr> or OPERATOR_IDENTIFIER expected, got '.'
+    PsiElement(DOT)('.')
+  PsiElement(VIRTUAL_END_DECL)('\n')
+  ElmValueDeclaration(VALUE_DECLARATION)
+    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
+      PsiElement(LOWER_CASE_IDENTIFIER)('f2')
+      PsiWhiteSpace(' ')
+      ElmLowerPattern(LOWER_PATTERN)
+        PsiElement(LOWER_CASE_IDENTIFIER)('x')
+    PsiWhiteSpace(' ')
+    PsiElement(EQ)('=')
+    PsiWhiteSpace(' ')
     ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
       ElmValueExpr(VALUE_EXPR)
         ElmValueQID(VALUE_QID)
           PsiElement(LOWER_CASE_IDENTIFIER)('x')
       PsiElement(DOT)('.')
-      PsiErrorElement:<expr> or LOWER_CASE_IDENTIFIER expected
-        <empty list>
+      PsiElement(LOWER_CASE_IDENTIFIER)('bar')
+  PsiElement(DOT)('.')
+  PsiErrorElement:LOWER_CASE_IDENTIFIER expected
+    <empty list>
   PsiElement(VIRTUAL_END_DECL)('\n')
   ElmValueDeclaration(VALUE_DECLARATION)
     ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
-      PsiElement(LOWER_CASE_IDENTIFIER)('f2')
+      PsiElement(LOWER_CASE_IDENTIFIER)('f3')
       PsiWhiteSpace(' ')
       ElmLowerPattern(LOWER_PATTERN)
         PsiElement(LOWER_CASE_IDENTIFIER)('x')
     PsiWhiteSpace(' ')
     PsiElement(EQ)('=')
     PsiWhiteSpace(' ')
-    ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
-      ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
-        ElmValueExpr(VALUE_EXPR)
-          ElmValueQID(VALUE_QID)
-            PsiElement(LOWER_CASE_IDENTIFIER)('x')
+    ElmValueExpr(VALUE_EXPR)
+      ElmValueQID(VALUE_QID)
+        PsiElement(UPPER_CASE_IDENTIFIER)('Foo')
         PsiElement(DOT)('.')
         PsiElement(LOWER_CASE_IDENTIFIER)('bar')
-      PsiElement(DOT)('.')
-      PsiErrorElement:<expr> or LOWER_CASE_IDENTIFIER expected
-        <empty list>
+  PsiElement(DOT)('.')
+  PsiErrorElement:LOWER_CASE_IDENTIFIER expected
+    <empty list>
   PsiElement(VIRTUAL_END_DECL)('\n')
+  PsiWhiteSpace('\n')
   ElmValueDeclaration(VALUE_DECLARATION)
     ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
-      PsiElement(LOWER_CASE_IDENTIFIER)('f3')
+      PsiElement(LOWER_CASE_IDENTIFIER)('p1')
       PsiWhiteSpace(' ')
       ElmLowerPattern(LOWER_PATTERN)
         PsiElement(LOWER_CASE_IDENTIFIER)('x')
     PsiWhiteSpace(' ')
     PsiElement(EQ)('=')
     PsiWhiteSpace(' ')
-    ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
-      ElmValueExpr(VALUE_EXPR)
-        ElmValueQID(VALUE_QID)
-          PsiElement(UPPER_CASE_IDENTIFIER)('Foo')
-          PsiElement(DOT)('.')
-          PsiElement(LOWER_CASE_IDENTIFIER)('bar')
-      PsiElement(DOT)('.')
-      PsiErrorElement:<expr> or LOWER_CASE_IDENTIFIER expected
-        <empty list>
+    ElmParenthesizedExpr(PARENTHESIZED_EXPR)
+      PsiElement(LEFT_PARENTHESIS)('(')
+      ElmFunctionCallExpr(FUNCTION_CALL_EXPR)
+        ElmValueExpr(VALUE_EXPR)
+          ElmValueQID(VALUE_QID)
+            PsiElement(LOWER_CASE_IDENTIFIER)('foo')
+        PsiWhiteSpace(' ')
+        ElmValueExpr(VALUE_EXPR)
+          ElmValueQID(VALUE_QID)
+            PsiElement(LOWER_CASE_IDENTIFIER)('x')
+      PsiElement(RIGHT_PARENTHESIS)(')')
+  PsiElement(DOT)('.')
+  PsiErrorElement:LOWER_CASE_IDENTIFIER expected
+    <empty list>
   PsiElement(VIRTUAL_END_DECL)('\n')
-  PsiWhiteSpace('\n')
   ElmValueDeclaration(VALUE_DECLARATION)
     ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
-      PsiElement(LOWER_CASE_IDENTIFIER)('p1')
+      PsiElement(LOWER_CASE_IDENTIFIER)('p2')
       PsiWhiteSpace(' ')
       ElmLowerPattern(LOWER_PATTERN)
         PsiElement(LOWER_CASE_IDENTIFIER)('x')
@@ -78,41 +98,33 @@ Elm File
               PsiElement(LOWER_CASE_IDENTIFIER)('x')
         PsiElement(RIGHT_PARENTHESIS)(')')
       PsiElement(DOT)('.')
-      PsiErrorElement:<expr> or LOWER_CASE_IDENTIFIER expected
-        <empty list>
+      PsiElement(LOWER_CASE_IDENTIFIER)('bar')
+  PsiElement(DOT)('.')
+  PsiErrorElement:LOWER_CASE_IDENTIFIER expected
+    <empty list>
   PsiElement(VIRTUAL_END_DECL)('\n')
+  PsiWhiteSpace('\n')
   ElmValueDeclaration(VALUE_DECLARATION)
     ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
-      PsiElement(LOWER_CASE_IDENTIFIER)('p2')
-      PsiWhiteSpace(' ')
-      ElmLowerPattern(LOWER_PATTERN)
-        PsiElement(LOWER_CASE_IDENTIFIER)('x')
+      PsiElement(LOWER_CASE_IDENTIFIER)('r1')
     PsiWhiteSpace(' ')
     PsiElement(EQ)('=')
     PsiWhiteSpace(' ')
-    ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
-      ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
-        ElmParenthesizedExpr(PARENTHESIZED_EXPR)
-          PsiElement(LEFT_PARENTHESIS)('(')
-          ElmFunctionCallExpr(FUNCTION_CALL_EXPR)
-            ElmValueExpr(VALUE_EXPR)
-              ElmValueQID(VALUE_QID)
-                PsiElement(LOWER_CASE_IDENTIFIER)('foo')
-            PsiWhiteSpace(' ')
-            ElmValueExpr(VALUE_EXPR)
-              ElmValueQID(VALUE_QID)
-                PsiElement(LOWER_CASE_IDENTIFIER)('x')
-          PsiElement(RIGHT_PARENTHESIS)(')')
-        PsiElement(DOT)('.')
-        PsiElement(LOWER_CASE_IDENTIFIER)('bar')
-      PsiElement(DOT)('.')
-      PsiErrorElement:<expr> or LOWER_CASE_IDENTIFIER expected
-        <empty list>
+    ElmRecordExpr(RECORD_EXPR)
+      PsiElement(LEFT_BRACE)('{')
+      ElmField(FIELD)
+        PsiElement(LOWER_CASE_IDENTIFIER)('x')
+        PsiElement(EQ)('=')
+        ElmNumberConstantExpr(NUMBER_CONSTANT_EXPR)
+          PsiElement(NUMBER_LITERAL)('2')
+      PsiElement(RIGHT_BRACE)('}')
+  PsiElement(DOT)('.')
+  PsiErrorElement:unmatched input
+    <empty list>
   PsiElement(VIRTUAL_END_DECL)('\n')
-  PsiWhiteSpace('\n')
   ElmValueDeclaration(VALUE_DECLARATION)
     ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
-      PsiElement(LOWER_CASE_IDENTIFIER)('r1')
+      PsiElement(LOWER_CASE_IDENTIFIER)('r2')
     PsiWhiteSpace(' ')
     PsiElement(EQ)('=')
     PsiWhiteSpace(' ')
@@ -122,37 +134,17 @@ Elm File
         ElmField(FIELD)
           PsiElement(LOWER_CASE_IDENTIFIER)('x')
           PsiElement(EQ)('=')
-          ElmNumberConstantExpr(NUMBER_CONSTANT_EXPR)
-            PsiElement(NUMBER_LITERAL)('2')
+          ElmRecordExpr(RECORD_EXPR)
+            PsiElement(LEFT_BRACE)('{')
+            ElmField(FIELD)
+              PsiElement(LOWER_CASE_IDENTIFIER)('y')
+              PsiElement(EQ)('=')
+              ElmNumberConstantExpr(NUMBER_CONSTANT_EXPR)
+                PsiElement(NUMBER_LITERAL)('2')
+            PsiElement(RIGHT_BRACE)('}')
         PsiElement(RIGHT_BRACE)('}')
       PsiElement(DOT)('.')
-      PsiErrorElement:LOWER_CASE_IDENTIFIER expected
-        <empty list>
-  PsiElement(VIRTUAL_END_DECL)('\n')
-  ElmValueDeclaration(VALUE_DECLARATION)
-    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
-      PsiElement(LOWER_CASE_IDENTIFIER)('r2')
-    PsiWhiteSpace(' ')
-    PsiElement(EQ)('=')
-    PsiWhiteSpace(' ')
-    ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
-      ElmFieldAccessExpr(FIELD_ACCESS_EXPR)
-        ElmRecordExpr(RECORD_EXPR)
-          PsiElement(LEFT_BRACE)('{')
-          ElmField(FIELD)
-            PsiElement(LOWER_CASE_IDENTIFIER)('x')
-            PsiElement(EQ)('=')
-            ElmRecordExpr(RECORD_EXPR)
-              PsiElement(LEFT_BRACE)('{')
-              ElmField(FIELD)
-                PsiElement(LOWER_CASE_IDENTIFIER)('y')
-                PsiElement(EQ)('=')
-                ElmNumberConstantExpr(NUMBER_CONSTANT_EXPR)
-                  PsiElement(NUMBER_LITERAL)('2')
-              PsiElement(RIGHT_BRACE)('}')
-          PsiElement(RIGHT_BRACE)('}')
-        PsiElement(DOT)('.')
-        PsiElement(LOWER_CASE_IDENTIFIER)('x')
-      PsiElement(DOT)('.')
-      PsiErrorElement:LOWER_CASE_IDENTIFIER expected
-        <empty list>
+      PsiElement(LOWER_CASE_IDENTIFIER)('x')
+  PsiElement(DOT)('.')
+  PsiErrorElement:LOWER_CASE_IDENTIFIER expected
+    <empty list>

Support references to record fields in annotated functions (#459)