unison/unison-src/transcripts/generic-parse-errors.output.md
Greg Pfeil 782ac4164d
Remove redundant , from lexer errors
Appositives only need to be offset by commas if there isn’t already some other punctuation.
2024-06-23 22:18:51 -05:00

1.5 KiB

Just a bunch of random parse errors to test the error formatting.

x = 
  foo.123

  Loading changes detected in scratch.u.

  I got confused here:
  
      2 |   foo.123
  
  
  I was surprised to find a 1 here.
  I was expecting one of these instead:
  
  * end of input
  * hash (ex: #af3sj3)
  * identifier (ex: abba1, snake_case, .foo.bar#xyz, .foo.++#xyz, or 🌻)

namespace.blah = 1

  Loading changes detected in scratch.u.

  The identifier `namespace` used here is a reserved keyword: 
  
      1 | namespace.blah = 1
  
  You can avoid this problem either by renaming the identifier
  or wrapping it in backticks (like `namespace` ).

x = 1 ]

  Loading changes detected in scratch.u.

  I found a closing ']' here without a matching '['.
  
      1 | x = 1 ]
  

x = a.#abc

  Loading changes detected in scratch.u.

  I got confused here:
  
      1 | x = a.#abc
  
  
  I was surprised to find a '.' here.

x = "hi

  Loading changes detected in scratch.u.

  I got confused here:
  
      2 | 
  
  I was surprised to find an end of input here.
  I was expecting one of these instead:
  
  * "
  * \s
  * literal character

y : a 

  Loading changes detected in scratch.u.

  I got confused here:
  
      2 | 
  
  I was surprised to find an end of section here.
  I was expecting one of these instead:
  
  * ->
  * newline or semicolon