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.