Open
Description
The current implementation of the parser allows more than is needed. These are vestiges from the first versions of the system. Most of them should already emit an error or warning stating that the new syntax should be used. Now we need to tighten the rules to make sure they all emit errors.
SimpleExpr ::= ...
| Quoted
| Splice
| ...
Pattern ::= ...
| Quoted
| ...
Quotes
Quotes come in four flavors: quoted identifiers, quoted blocks, quoted blocks patterns and quoted type patterns.
Quoted ::= `'` alphaid // quoted identifier
| `'` `{` Block `}` // quoted block
| `'` `[` Type `]` if inPattern // quoted type pattern
Splices
Splices come in three flavors: spliced identifiers, spliced blocks and splice patterns.
Splice ::= `$` alphaid if inQuoteBlock // spliced identifier
| `$` `{` Block `}` if !inQuotePattern // spliced block
| `$` `{` Pattern `}` if inQuotePattern // splice pattern