pub trait AstVisitor {
Show 13 methods
// Required methods
fn visit_node(&mut self, node: &AstKind);
fn visit_statement(&mut self, node: &StatementNode);
fn visit_expr(&mut self, node: &ExprKind);
fn visit_assignable_expr(&mut self, node: &AssignableKind);
fn visit_bin_op(&mut self, node: &BinaryOperationNode);
fn visit_unary_op(&mut self, node: &UnaryOperationNode);
fn visit_identifier(&mut self, node: &IdentifierNode);
fn visit_literal(&mut self, node: &LiteralNode);
fn visit_member_access(&mut self, node: &MemberAccessNode);
fn visit_meta(&mut self, node: &MetaNode);
fn visit_function_call(&mut self, node: &FunctionCallNode);
fn visit_function(&mut self, node: &FunctionNode);
fn visit_return(&mut self, node: &ReturnNode);
}
Expand description
Represents a visitor for the AST.
Required Methods§
Sourcefn visit_node(&mut self, node: &AstKind)
fn visit_node(&mut self, node: &AstKind)
Visits an AstNode
Sourcefn visit_statement(&mut self, node: &StatementNode)
fn visit_statement(&mut self, node: &StatementNode)
Visits a statement node.
Sourcefn visit_expr(&mut self, node: &ExprKind)
fn visit_expr(&mut self, node: &ExprKind)
Visits an expression node.
Sourcefn visit_assignable_expr(&mut self, node: &AssignableKind)
fn visit_assignable_expr(&mut self, node: &AssignableKind)
Visits an assignable expression node.
Sourcefn visit_bin_op(&mut self, node: &BinaryOperationNode)
fn visit_bin_op(&mut self, node: &BinaryOperationNode)
Visits a binary operation node.
Sourcefn visit_unary_op(&mut self, node: &UnaryOperationNode)
fn visit_unary_op(&mut self, node: &UnaryOperationNode)
Visits a unary operation node.
Sourcefn visit_identifier(&mut self, node: &IdentifierNode)
fn visit_identifier(&mut self, node: &IdentifierNode)
Visits an identifier node.
Sourcefn visit_literal(&mut self, node: &LiteralNode)
fn visit_literal(&mut self, node: &LiteralNode)
Visits a literal node.
Sourcefn visit_member_access(&mut self, node: &MemberAccessNode)
fn visit_member_access(&mut self, node: &MemberAccessNode)
Visits a member access node.
Sourcefn visit_meta(&mut self, node: &MetaNode)
fn visit_meta(&mut self, node: &MetaNode)
Visits a meta node.
Sourcefn visit_function_call(&mut self, node: &FunctionCallNode)
fn visit_function_call(&mut self, node: &FunctionCallNode)
Visits a function call node.
Sourcefn visit_function(&mut self, node: &FunctionNode)
fn visit_function(&mut self, node: &FunctionNode)
Visits a function node.
Sourcefn visit_return(&mut self, node: &ReturnNode)
fn visit_return(&mut self, node: &ReturnNode)
Visits a return node.