Module ir

Module ir 

Source
Expand description

Re-export the .sw IR parser and AST.

Modules§

ast
error
graph
lexer
lower
optimize
parser
shapes
token
validate

Structs§

Error
All errors that can occur during lexing, parsing, or IR construction.
IrProgram
The full program IR — lowered from the AST.
Program
A complete .sw program is a sequence of directives and imports.

Functions§

infer_shapes
Run shape inference on all graphs in the program. Modifies node output_type in place.
lower
Lower a parsed AST program into a Graph IR program.
optimize
Run all optimization passes on every graph in the program. Returns the total number of transformations applied.
parse
Parse a .sw source string into an AST Program.
validate
Validate an entire IrProgram. Returns all errors found (does not stop at first).

Type Aliases§

Result
Result type for the IR crate.