haskell / happy

The Happy parser generator for Haskell
Other
291 stars 84 forks source link

Improve the abstract syntax for tokens #307

Closed Ericson2314 closed 2 months ago

Ericson2314 commented 2 months ago

Instead of deferring the handling of $$ to the backends, properly parse the $$ syntax up front, and store the result in the AST.

Note that the GLR backend was improperly substituting the $$ twice. Now that we have better types, this was surfaced as type error, and then removed.

Fixes #295