Skip to main content

Module compile

Module compile 

Source
Expand description

Running the front end over one file, from the bytes on disk to the typed tree.

Design: spec/04-driver-and-cli.md section 4.3, and the M2 exit criterion in spec/17-milestones.md that says --emit=tast works.

preprocess stops after phase 4 because -E stops there. This carries on: phase 7, the parse, and the checking. It is one function rather than four composed ones because of what the four share. The tokens hold interned symbols, the untyped tree holds tokens, the typed tree holds the untyped tree’s spans, and none of them owns the table it is reading, so one Session has to outlive all of them and there has to be one place that holds it.

Structs§

Compiled
What compiling one file produced.

Functions§

compile
Compiles one file as far as opts.emit asks for and renders the result.
compile_ir
Reads one file of IR, checks it, and prints it back.