Visit

Trait Visit 

Source
pub trait Visit<'ast> {
    type BreakValue;

Show 78 methods // Provided methods fn visit_source_unit( &mut self, source_unit: &'ast SourceUnit<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_item( &mut self, item: &'ast Item<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_pragma_directive( &mut self, pragma: &'ast PragmaDirective<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_import_directive( &mut self, import: &'ast ImportDirective<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_using_directive( &mut self, using: &'ast UsingDirective<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_item_contract( &mut self, contract: &'ast ItemContract<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_item_function( &mut self, function: &'ast ItemFunction<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_item_struct( &mut self, strukt: &'ast ItemStruct<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_item_enum( &mut self, enum_: &'ast ItemEnum<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_item_udvt( &mut self, udvt: &'ast ItemUdvt<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_item_error( &mut self, error: &'ast ItemError<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_item_event( &mut self, event: &'ast ItemEvent<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_variable_definition( &mut self, var: &'ast VariableDefinition<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_ty( &mut self, ty: &'ast Type<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_function_header( &mut self, header: &'ast FunctionHeader<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_modifier( &mut self, modifier: &'ast Modifier<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_override( &mut self, override_: &'ast Override<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_call_args( &mut self, args: &'ast CallArgs<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_named_args( &mut self, args: &'ast &'ast mut RawThinSlice<(), NamedArg<'ast>>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_stmt( &mut self, stmt: &'ast Stmt<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_stmt_assembly( &mut self, assembly: &'ast StmtAssembly<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_stmt_try( &mut self, try_: &'ast StmtTry<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_try_catch_clause( &mut self, catch: &'ast TryCatchClause<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_block( &mut self, block: &'ast Block<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_expr( &mut self, expr: &'ast Expr<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_parameter_list( &mut self, list: &'ast ParameterList<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_lit(&mut self, lit: &'ast Lit<'_>) -> ControlFlow<Self::BreakValue> { ... } fn visit_yul_stmt( &mut self, stmt: &'ast Stmt<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_yul_block( &mut self, block: &'ast Block<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_yul_stmt_switch( &mut self, switch: &'ast StmtSwitch<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_yul_stmt_case( &mut self, case: &'ast StmtSwitchCase<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_yul_function( &mut self, function: &'ast Function<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_yul_expr( &mut self, expr: &'ast Expr<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_yul_expr_call( &mut self, call: &'ast ExprCall<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_doc_comments( &mut self, doc_comments: &'ast DocComments<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_doc_comment( &mut self, doc_comment: &'ast DocComment, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_path( &mut self, path: &'ast PathSlice, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_ident( &mut self, ident: &'ast Ident, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_span(&mut self, span: &'ast Span) -> ControlFlow<Self::BreakValue> { ... } fn walk_source_unit( &mut self, source_unit: &'ast SourceUnit<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_item( &mut self, item: &'ast Item<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_pragma_directive( &mut self, pragma: &'ast PragmaDirective<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_import_directive( &mut self, import: &'ast ImportDirective<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_using_directive( &mut self, using: &'ast UsingDirective<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_item_contract( &mut self, contract: &'ast ItemContract<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_item_function( &mut self, function: &'ast ItemFunction<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_item_struct( &mut self, strukt: &'ast ItemStruct<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_item_enum( &mut self, enum_: &'ast ItemEnum<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_item_udvt( &mut self, udvt: &'ast ItemUdvt<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_item_error( &mut self, error: &'ast ItemError<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_item_event( &mut self, event: &'ast ItemEvent<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_variable_definition( &mut self, var: &'ast VariableDefinition<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_ty(&mut self, ty: &'ast Type<'ast>) -> ControlFlow<Self::BreakValue> { ... } fn walk_function_header( &mut self, header: &'ast FunctionHeader<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_modifier( &mut self, modifier: &'ast Modifier<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_override( &mut self, override_: &'ast Override<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_call_args( &mut self, args: &'ast CallArgs<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_named_args( &mut self, args: &'ast &'ast mut RawThinSlice<(), NamedArg<'ast>>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_stmt( &mut self, stmt: &'ast Stmt<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_stmt_assembly( &mut self, assembly: &'ast StmtAssembly<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_stmt_try( &mut self, try_: &'ast StmtTry<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_try_catch_clause( &mut self, catch: &'ast TryCatchClause<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_block( &mut self, block: &'ast Block<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_expr( &mut self, expr: &'ast Expr<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_parameter_list( &mut self, list: &'ast ParameterList<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_lit(&mut self, lit: &'ast Lit<'_>) -> ControlFlow<Self::BreakValue> { ... } fn walk_yul_stmt( &mut self, stmt: &'ast Stmt<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_yul_block( &mut self, block: &'ast Block<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_yul_stmt_switch( &mut self, switch: &'ast StmtSwitch<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_yul_stmt_case( &mut self, case: &'ast StmtSwitchCase<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_yul_function( &mut self, function: &'ast Function<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_yul_expr( &mut self, expr: &'ast Expr<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_yul_expr_call( &mut self, call: &'ast ExprCall<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_doc_comments( &mut self, doc_comments: &'ast DocComments<'ast>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_doc_comment( &mut self, doc_comment: &'ast DocComment, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_path( &mut self, path: &'ast PathSlice, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_ident( &mut self, ident: &'ast Ident, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_span(&mut self, span: &'ast Span) -> ControlFlow<Self::BreakValue> { ... }
}
Expand description

AST traversal.

Required Associated Types§

Source

type BreakValue

The value returned when breaking from the traversal.

This can be Never to indicate that the traversal should never break.

Provided Methods§

Source

fn visit_source_unit( &mut self, source_unit: &'ast SourceUnit<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_item( &mut self, item: &'ast Item<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_pragma_directive( &mut self, pragma: &'ast PragmaDirective<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_import_directive( &mut self, import: &'ast ImportDirective<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_using_directive( &mut self, using: &'ast UsingDirective<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_item_contract( &mut self, contract: &'ast ItemContract<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_item_function( &mut self, function: &'ast ItemFunction<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_item_struct( &mut self, strukt: &'ast ItemStruct<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_item_enum( &mut self, enum_: &'ast ItemEnum<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_item_udvt( &mut self, udvt: &'ast ItemUdvt<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_item_error( &mut self, error: &'ast ItemError<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_item_event( &mut self, event: &'ast ItemEvent<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_variable_definition( &mut self, var: &'ast VariableDefinition<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_ty(&mut self, ty: &'ast Type<'ast>) -> ControlFlow<Self::BreakValue>

Source

fn visit_function_header( &mut self, header: &'ast FunctionHeader<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_modifier( &mut self, modifier: &'ast Modifier<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_override( &mut self, override_: &'ast Override<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_call_args( &mut self, args: &'ast CallArgs<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_named_args( &mut self, args: &'ast &'ast mut RawThinSlice<(), NamedArg<'ast>>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_stmt( &mut self, stmt: &'ast Stmt<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_stmt_assembly( &mut self, assembly: &'ast StmtAssembly<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_stmt_try( &mut self, try_: &'ast StmtTry<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_try_catch_clause( &mut self, catch: &'ast TryCatchClause<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_block( &mut self, block: &'ast Block<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_expr( &mut self, expr: &'ast Expr<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_parameter_list( &mut self, list: &'ast ParameterList<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_lit(&mut self, lit: &'ast Lit<'_>) -> ControlFlow<Self::BreakValue>

Source

fn visit_yul_stmt( &mut self, stmt: &'ast Stmt<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_yul_block( &mut self, block: &'ast Block<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_yul_stmt_switch( &mut self, switch: &'ast StmtSwitch<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_yul_stmt_case( &mut self, case: &'ast StmtSwitchCase<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_yul_function( &mut self, function: &'ast Function<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_yul_expr( &mut self, expr: &'ast Expr<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_yul_expr_call( &mut self, call: &'ast ExprCall<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_doc_comments( &mut self, doc_comments: &'ast DocComments<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_doc_comment( &mut self, doc_comment: &'ast DocComment, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_path(&mut self, path: &'ast PathSlice) -> ControlFlow<Self::BreakValue>

Source

fn visit_ident(&mut self, ident: &'ast Ident) -> ControlFlow<Self::BreakValue>

Source

fn visit_span(&mut self, span: &'ast Span) -> ControlFlow<Self::BreakValue>

Source

fn walk_source_unit( &mut self, source_unit: &'ast SourceUnit<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_item(&mut self, item: &'ast Item<'ast>) -> ControlFlow<Self::BreakValue>

Source

fn walk_pragma_directive( &mut self, pragma: &'ast PragmaDirective<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_import_directive( &mut self, import: &'ast ImportDirective<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_using_directive( &mut self, using: &'ast UsingDirective<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_item_contract( &mut self, contract: &'ast ItemContract<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_item_function( &mut self, function: &'ast ItemFunction<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_item_struct( &mut self, strukt: &'ast ItemStruct<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_item_enum( &mut self, enum_: &'ast ItemEnum<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_item_udvt( &mut self, udvt: &'ast ItemUdvt<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_item_error( &mut self, error: &'ast ItemError<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_item_event( &mut self, event: &'ast ItemEvent<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_variable_definition( &mut self, var: &'ast VariableDefinition<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_ty(&mut self, ty: &'ast Type<'ast>) -> ControlFlow<Self::BreakValue>

Source

fn walk_function_header( &mut self, header: &'ast FunctionHeader<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_modifier( &mut self, modifier: &'ast Modifier<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_override( &mut self, override_: &'ast Override<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_call_args( &mut self, args: &'ast CallArgs<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_named_args( &mut self, args: &'ast &'ast mut RawThinSlice<(), NamedArg<'ast>>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_stmt(&mut self, stmt: &'ast Stmt<'ast>) -> ControlFlow<Self::BreakValue>

Source

fn walk_stmt_assembly( &mut self, assembly: &'ast StmtAssembly<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_stmt_try( &mut self, try_: &'ast StmtTry<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_try_catch_clause( &mut self, catch: &'ast TryCatchClause<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_block( &mut self, block: &'ast Block<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_expr(&mut self, expr: &'ast Expr<'ast>) -> ControlFlow<Self::BreakValue>

Source

fn walk_parameter_list( &mut self, list: &'ast ParameterList<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_lit(&mut self, lit: &'ast Lit<'_>) -> ControlFlow<Self::BreakValue>

Source

fn walk_yul_stmt( &mut self, stmt: &'ast Stmt<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_yul_block( &mut self, block: &'ast Block<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_yul_stmt_switch( &mut self, switch: &'ast StmtSwitch<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_yul_stmt_case( &mut self, case: &'ast StmtSwitchCase<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_yul_function( &mut self, function: &'ast Function<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_yul_expr( &mut self, expr: &'ast Expr<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_yul_expr_call( &mut self, call: &'ast ExprCall<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_doc_comments( &mut self, doc_comments: &'ast DocComments<'ast>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_doc_comment( &mut self, doc_comment: &'ast DocComment, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_path(&mut self, path: &'ast PathSlice) -> ControlFlow<Self::BreakValue>

Source

fn walk_ident(&mut self, ident: &'ast Ident) -> ControlFlow<Self::BreakValue>

Source

fn walk_span(&mut self, span: &'ast Span) -> ControlFlow<Self::BreakValue>

Implementors§