Trait leo_passes::pass::Pass

source ·
pub trait Pass {
    type Input;
    type Output;

    // Required method
    fn do_pass(input: Self::Input) -> Self::Output;
}
Expand description

A compiler pass consuming Self::Input and returning Self::Output.

Required Associated Types§

Required Methods§

source

fn do_pass(input: Self::Input) -> Self::Output

Runs the compiler pass.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a> Pass for CodeGenerator<'a>

§

type Input = (&'a Ast, &'a SymbolTable, &'a TypeTable, &'a DiGraph<Symbol>, &'a DiGraph<Symbol>, &'a Program)

§

type Output = Result<String, LeoError>

source§

impl<'a> Pass for DeadCodeEliminator<'a>

§

type Input = (Ast, &'a NodeBuilder)

§

type Output = Result<Ast, LeoError>

source§

impl<'a> Pass for Destructurer<'a>

§

type Input = (Ast, &'a TypeTable, &'a NodeBuilder, &'a Assigner)

§

type Output = Result<Ast, LeoError>

source§

impl<'a> Pass for Flattener<'a>

§

type Input = (Ast, &'a SymbolTable, &'a TypeTable, &'a NodeBuilder, &'a Assigner)

§

type Output = Result<Ast, LeoError>

source§

impl<'a> Pass for FunctionInliner<'a>

§

type Input = (Ast, &'a NodeBuilder, &'a DiGraph<Symbol>, &'a Assigner, &'a TypeTable)

§

type Output = Result<Ast, LeoError>

source§

impl<'a> Pass for Unroller<'a>

§

type Input = (Ast, &'a Handler, &'a NodeBuilder, SymbolTable, &'a TypeTable)

§

type Output = Result<(Ast, SymbolTable), LeoError>

source§

impl<'a> Pass for StaticSingleAssigner<'a>

§

type Input = (Ast, &'a NodeBuilder, &'a Assigner, &'a SymbolTable, &'a TypeTable)

§

type Output = Result<Ast, LeoError>

source§

impl<'a> Pass for SymbolTableCreator<'a>

§

type Input = (&'a Ast, &'a Handler)

§

type Output = Result<SymbolTable, LeoError>

source§

impl<'a, N: Network> Pass for TypeChecker<'a, N>

§

type Input = (&'a Ast, &'a Handler, SymbolTable, &'a TypeTable, usize, bool)

§

type Output = Result<(SymbolTable, DiGraph<Symbol>, DiGraph<Symbol>), LeoError>