This is a parser frontend for the Go programming language designed to be used with goblin.
The abstract syntax and type definitions are in AST.hs and Types.hs, respectively. Rec.hs contains generic combinators for folding over the syntax.
The frontend proceeds in three phases:
- The JSON parser (Parser.hs) deserializes a JSON-encoded AST produced by goblin.
- The desugaring pass (Desugar.hs) performs various (purely syntactic) transformations.
- The renamer (Renamer.hs) fills in missing qualifiers so that all global identifiers become fully qualified.