<NME> ValueDecl.txt
<BEF> Elm File
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('f1')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiErrorElement:<list of operands> expected, got '
'
      <empty list>
  PsiElement(VIRTUAL_END_DECL)('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('f2')
      PsiElement(LOWER_CASE_IDENTIFIER)('f2')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiErrorElement:<list of operands> expected, got 'type'
      <empty list>
  PsiWhiteSpace(' ')
  PsiElement(TYPE)('type')
  PsiElement(UPPER_CASE_IDENTIFIER)('Blah')
  PsiElement(VIRTUAL_END_DECL)('\n')
  PsiWhiteSpace('\n')
  ElmValueDeclaration(VALUE_DECLARATION)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
    ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
      PsiElement(LOWER_CASE_IDENTIFIER)('f3')
      PsiWhiteSpace(' ')
      ElmPattern(PATTERN)
        ElmLiteral(LITERAL)
          PsiElement(NUMBER_LITERAL)('42')
    PsiWhiteSpace(' ')
    PsiElement(EQ)('=')
    PsiErrorElement:<list of operands> expected, got ','
      <empty list>
  PsiWhiteSpace(' ')
  PsiElement(COMMA)(',')

<MSG> Improve PSI expression and pattern structure (#73)

* Improve PSI expression and pattern structure

This PR includes several improvements to the current PSI:

* Element tags are all in the same file to reduce cognitive overhead when navigating source.
* Fixed bug in `Pattern` parse rule that would accept syntax that is an error in elm
* Removed `ListOfOperands` element in favor of a flatter tree and an actual `FunctionCall` element. This brings the PSI closer in structure to the Elm compiler's stage 1 AST.
* Fixed hierarchy for tags that inherited from other tags.

To elaborate on the last point, the problem was with overly broad return types. For example: `ElmParametricTypeRef` cannot have another `ElmParametricTypeRef` as its direct child. But because `ElmParametricTypeRef.allParameters` returned `ElmParametricTypeRefParameterTag`s, which inherited `ElmTypeRefParameterTag`, `allParameters` could actually return other `ElmParametricTypeRef`s. Changing both of those tags to inherit from a third tag rather than from each other fixes the problem while still allowing you to handle both on the same function if you need to.

* Fix crash in negate expression parsing

* Fix typo

<DFF> @@ -4,7 +4,7 @@ Elm File
       PsiElement(LOWER_CASE_IDENTIFIER)('f1')
     PsiWhiteSpace(' ')
     PsiElement(EQ)('=')
-    PsiErrorElement:<list of operands> expected, got '
+    PsiErrorElement:<expression> expected, got '
 '
       <empty list>
   PsiElement(VIRTUAL_END_DECL)('\n')
@@ -14,7 +14,7 @@ Elm File
       PsiElement(LOWER_CASE_IDENTIFIER)('f2')
     PsiWhiteSpace(' ')
     PsiElement(EQ)('=')
-    PsiErrorElement:<list of operands> expected, got 'type'
+    PsiErrorElement:<expression> expected, got 'type'
       <empty list>
   PsiWhiteSpace(' ')
   PsiElement(TYPE)('type')
@@ -26,12 +26,11 @@ Elm File
     ElmFunctionDeclarationLeft(FUNCTION_DECLARATION_LEFT)
       PsiElement(LOWER_CASE_IDENTIFIER)('f3')
       PsiWhiteSpace(' ')
-      ElmPattern(PATTERN)
-        ElmLiteral(LITERAL)
-          PsiElement(NUMBER_LITERAL)('42')
+      ElmLiteral(LITERAL)
+        PsiElement(NUMBER_LITERAL)('42')
     PsiWhiteSpace(' ')
     PsiElement(EQ)('=')
-    PsiErrorElement:<list of operands> expected, got ','
+    PsiErrorElement:<expression> expected, got ','
       <empty list>
   PsiWhiteSpace(' ')
   PsiElement(COMMA)(',')
\ No newline at end of file

Improve PSI expression and pattern structure (#73)