unison/unison-src/transcripts/generic-parse-errors.output.md
Greg Pfeil 00f6c8c954
Refactoring TranscriptParser
A bunch of small changes in TranscriptParser

- remove dead code
- don’t use `Show` for formatted output
- put processed blocks in a separate sum type from unprocessed blocks
- remove `Transcript` from identifiers (changed importers to use
 `qualified as Transcript`)
- deduplicated some error reporting

And one happy fix, IMO – got rid of the `Text.init` that plagued me in
2024-07-16 19:31:01 -06:00

1.7 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.
  I was expecting one of these instead:
  
  * and
  * bang
  * do
  * false
  * force
  * handle
  * if
  * infixApp
  * let
  * newline or semicolon
  * or
  * quote
  * termLink
  * true
  * tuple
  * typeLink

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