Trait leo_ast::passes::consumer::StatementConsumer

source ·
pub trait StatementConsumer {
    type Output;

    // Required methods
    fn consume_assert(&mut self, input: AssertStatement) -> Self::Output;
    fn consume_assign(&mut self, input: AssignStatement) -> Self::Output;
    fn consume_block(&mut self, input: Block) -> Self::Output;
    fn consume_conditional(
        &mut self,
        input: ConditionalStatement
    ) -> Self::Output;
    fn consume_console(&mut self, input: ConsoleStatement) -> Self::Output;
    fn consume_const(&mut self, input: ConstDeclaration) -> Self::Output;
    fn consume_definition(&mut self, input: DefinitionStatement) -> Self::Output;
    fn consume_expression_statement(
        &mut self,
        input: ExpressionStatement
    ) -> Self::Output;
    fn consume_iteration(&mut self, input: IterationStatement) -> Self::Output;
    fn consume_return(&mut self, input: ReturnStatement) -> Self::Output;

    // Provided method
    fn consume_statement(&mut self, input: Statement) -> Self::Output { ... }
}
Expand description

A Consumer trait for statements in the AST.

Required Associated Types§

Required Methods§

source

fn consume_assert(&mut self, input: AssertStatement) -> Self::Output

source

fn consume_assign(&mut self, input: AssignStatement) -> Self::Output

source

fn consume_block(&mut self, input: Block) -> Self::Output

source

fn consume_conditional(&mut self, input: ConditionalStatement) -> Self::Output

source

fn consume_console(&mut self, input: ConsoleStatement) -> Self::Output

source

fn consume_const(&mut self, input: ConstDeclaration) -> Self::Output

source

fn consume_definition(&mut self, input: DefinitionStatement) -> Self::Output

source

fn consume_expression_statement( &mut self, input: ExpressionStatement ) -> Self::Output

source

fn consume_iteration(&mut self, input: IterationStatement) -> Self::Output

source

fn consume_return(&mut self, input: ReturnStatement) -> Self::Output

Provided Methods§

source

fn consume_statement(&mut self, input: Statement) -> Self::Output

Implementors§