gbf_core::decompiler::ast::visitors

Trait AstVisitor

Source
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§

Source

fn visit_node(&mut self, node: &AstKind)

Visits an AstNode

Source

fn visit_statement(&mut self, node: &StatementNode)

Visits a statement node.

Source

fn visit_expr(&mut self, node: &ExprKind)

Visits an expression node.

Source

fn visit_assignable_expr(&mut self, node: &AssignableKind)

Visits an assignable expression node.

Source

fn visit_bin_op(&mut self, node: &BinaryOperationNode)

Visits a binary operation node.

Source

fn visit_unary_op(&mut self, node: &UnaryOperationNode)

Visits a unary operation node.

Source

fn visit_identifier(&mut self, node: &IdentifierNode)

Visits an identifier node.

Source

fn visit_literal(&mut self, node: &LiteralNode)

Visits a literal node.

Source

fn visit_member_access(&mut self, node: &MemberAccessNode)

Visits a member access node.

Source

fn visit_meta(&mut self, node: &MetaNode)

Visits a meta node.

Source

fn visit_function_call(&mut self, node: &FunctionCallNode)

Visits a function call node.

Source

fn visit_function(&mut self, node: &FunctionNode)

Visits a function node.

Source

fn visit_return(&mut self, node: &ReturnNode)

Visits a return node.

Implementors§