Trait Visitor
Source pub trait Visitor {
type Output;
Show 57 methods
// Required methods
fn visit_program(&mut self, program: &Program) -> Self::Output;
fn visit_variable_declaration(
&mut self,
decl: &VariableDeclaration,
) -> Self::Output;
fn visit_function_declaration(
&mut self,
decl: &FunctionDeclaration,
) -> Self::Output;
fn visit_class_declaration(
&mut self,
decl: &ClassDeclaration,
) -> Self::Output;
fn visit_binary_expression(
&mut self,
expr: &BinaryExpression,
) -> Self::Output;
fn visit_unary_expression(&mut self, expr: &UnaryExpression) -> Self::Output;
fn visit_call_expression(&mut self, expr: &CallExpression) -> Self::Output;
fn visit_new_expression(&mut self, expr: &NewExpression) -> Self::Output;
fn visit_member_expression(
&mut self,
expr: &MemberExpression,
) -> Self::Output;
fn visit_assignment_expression(
&mut self,
expr: &AssignmentExpression,
) -> Self::Output;
fn visit_conditional_expression(
&mut self,
expr: &ConditionalExpression,
) -> Self::Output;
fn visit_logical_expression(
&mut self,
expr: &LogicalExpression,
) -> Self::Output;
fn visit_update_expression(
&mut self,
expr: &UpdateExpression,
) -> Self::Output;
fn visit_block_statement(&mut self, stmt: &BlockStatement) -> Self::Output;
fn visit_if_statement(&mut self, stmt: &IfStatement) -> Self::Output;
fn visit_for_statement(&mut self, stmt: &ForStatement) -> Self::Output;
fn visit_for_in_statement(&mut self, stmt: &ForInStatement) -> Self::Output;
fn visit_for_of_statement(&mut self, stmt: &ForOfStatement) -> Self::Output;
fn visit_while_statement(&mut self, stmt: &WhileStatement) -> Self::Output;
fn visit_do_while_statement(
&mut self,
stmt: &DoWhileStatement,
) -> Self::Output;
fn visit_switch_statement(&mut self, stmt: &SwitchStatement) -> Self::Output;
fn visit_try_statement(&mut self, stmt: &TryStatement) -> Self::Output;
fn visit_catch_clause(&mut self, clause: &CatchClause) -> Self::Output;
fn visit_throw_statement(&mut self, stmt: &ThrowStatement) -> Self::Output;
fn visit_return_statement(&mut self, stmt: &ReturnStatement) -> Self::Output;
fn visit_break_statement(&mut self, stmt: &BreakStatement) -> Self::Output;
fn visit_continue_statement(
&mut self,
stmt: &ContinueStatement,
) -> Self::Output;
fn visit_expression_statement(
&mut self,
stmt: &ExpressionStatement,
) -> Self::Output;
fn visit_array_literal(&mut self, lit: &ArrayLiteral) -> Self::Output;
fn visit_object_literal(&mut self, lit: &ObjectLiteral) -> Self::Output;
fn visit_property(&mut self, prop: &Property) -> Self::Output;
fn visit_identifier(&mut self, id: &str) -> Self::Output;
fn visit_number(&mut self, num: f64) -> Self::Output;
fn visit_string(&mut self, s: &str) -> Self::Output;
fn visit_boolean(&mut self, b: bool) -> Self::Output;
fn visit_null(&mut self) -> Self::Output;
fn visit_undefined(&mut self) -> Self::Output;
fn visit_this(&mut self) -> Self::Output;
fn visit_arrow_function_expression(
&mut self,
expr: &ArrowFunctionExpression,
) -> Self::Output;
fn visit_function_expression(
&mut self,
expr: &FunctionExpression,
) -> Self::Output;
fn visit_class_expression(&mut self, expr: &ClassExpression) -> Self::Output;
fn visit_yield_expression(&mut self, expr: &YieldExpression) -> Self::Output;
fn visit_await_expression(&mut self, expr: &AwaitExpression) -> Self::Output;
fn visit_super(&mut self, super_expr: &Super) -> Self::Output;
fn visit_meta_property(&mut self, prop: &MetaProperty) -> Self::Output;
fn visit_spread_element(&mut self, elem: &SpreadElement) -> Self::Output;
fn visit_rest_element(&mut self, elem: &RestElement) -> Self::Output;
fn visit_template_literal(&mut self, lit: &TemplateLiteral) -> Self::Output;
fn visit_tagged_template_expression(
&mut self,
expr: &TaggedTemplateExpression,
) -> Self::Output;
fn visit_import_declaration(
&mut self,
decl: &ImportDeclaration,
) -> Self::Output;
fn visit_export_declaration(
&mut self,
decl: &ExportDeclaration,
) -> Self::Output;
fn visit_labeled_statement(
&mut self,
stmt: &LabeledStatement,
) -> Self::Output;
fn visit_with_statement(&mut self, stmt: &WithStatement) -> Self::Output;
fn visit_debugger_statement(
&mut self,
stmt: &DebuggerStatement,
) -> Self::Output;
fn visit_bigint(&mut self, bigint: &str) -> Self::Output;
fn visit_regexp(&mut self, regexp: &RegExp) -> Self::Output;
// Provided method
fn visit_node(&mut self, node: &Node) -> Self::Output { ... }
}