AstVisitor

Trait AstVisitor 

Source
pub trait AstVisitor<E = ()> {
Show 66 methods // Provided methods fn stat_sep(&mut self) { ... } fn begin_if(&mut self, _cond: &Expr) -> Result<bool, E> { ... } fn then(&mut self, _block: &Block) -> Result<bool, E> { ... } fn begin_else_if(&mut self, _cond: &Expr) -> Result<bool, E> { ... } fn begin_else(&mut self, _block: &Block) -> Result<bool, E> { ... } fn end_if(&mut self) { ... } fn begin_while(&mut self, _cond: &Expr) -> Result<bool, E> { ... } fn begin_while_block(&mut self, _block: &Block) -> Result<bool, E> { ... } fn end_while(&mut self) { ... } fn begin_do_block(&mut self, _block: &Block) -> Result<bool, E> { ... } fn end_do_block(&mut self) { ... } fn for_num(&mut self, _fornum: &ForNum) -> Result<bool, E> { ... } fn for_list(&mut self, _forlist: &ForList) -> Result<bool, E> { ... } fn begin_for_block(&mut self, _block: &Block) -> Result<bool, E> { ... } fn end_for(&mut self) { ... } fn begin_repeat(&mut self, _block: &Block) -> Result<bool, E> { ... } fn until(&mut self) { ... } fn end_repeat(&mut self) { ... } fn func(&mut self, _funcstat: &FuncStat) { ... } fn local_stat(&mut self, _stat: &LocalStat) -> Result<(), E> { ... } fn label_stat(&mut self, _stat: &LabelStat) -> Result<(), E> { ... } fn ret_stat(&mut self, _stat: &RetStat) -> Result<(), E> { ... } fn break_stat(&mut self, _stat: &BreakStat) -> Result<(), E> { ... } fn goto_stat(&mut self, _stat: &GotoStat) -> Result<(), E> { ... } fn assign_stat(&mut self, _stat: &AssignStat) -> Result<(), E> { ... } fn call_stat(&mut self, _stat: &CallStat) -> Result<(), E> { ... } fn expr(&mut self, _stat: &Expr) -> Result<bool, E> { ... } fn expr_sep(&mut self) { ... } fn nil(&mut self) { ... } fn true_(&mut self) { ... } fn false_(&mut self) { ... } fn float(&mut self, _f: FloatType) { ... } fn int(&mut self, _i: IntType) { ... } fn string(&mut self, _s: &str) { ... } fn vararg(&mut self) { ... } fn anonymous_func(&mut self) { ... } fn begin_func_body(&mut self, _body: &FuncBody) -> Result<bool, E> { ... } fn end_func_body(&mut self) { ... } fn begin_table(&mut self, _t: &Table) -> Result<bool, E> { ... } fn end_table(&mut self, _t: &Table) { ... } fn field_sep(&mut self) { ... } fn begin_rec_field(&mut self, _field: &RecField) -> Result<bool, E> { ... } fn field_kv_sep(&mut self) { ... } fn begin_field_key(&mut self, _key: &FieldKey) -> Result<bool, E> { ... } fn end_field_key(&mut self, _key: &FieldKey) { ... } fn end_rec_field(&mut self) { ... } fn begin_bin_expr(&mut self, _expr: &BinExpr) -> Result<bool, E> { ... } fn binop(&mut self, _op: BinOp) { ... } fn end_bin_expr(&mut self) { ... } fn begin_un_expr(&mut self, _expr: &UnExpr) -> Result<bool, E> { ... } fn unop(&mut self, _op: UnOp) { ... } fn end_un_expr(&mut self) { ... } fn begin_suffixed_expr(&mut self, _expr: &SuffixedExpr) -> Result<bool, E> { ... } fn end_suffixed_expr(&mut self) { ... } fn name(&mut self, _name: &str) { ... } fn attr(&mut self, _attr: &str) { ... } fn method(&mut self, _method: &str) { ... } fn begin_index(&mut self, _expr: &Expr) -> Result<bool, E> { ... } fn end_index(&mut self) { ... } fn begin_func_args(&mut self, _args: &FuncArgs) -> Result<bool, E> { ... } fn end_func_args(&mut self) { ... } fn begin_paren_expr(&mut self, _expr: &Expr) -> Result<bool, E> { ... } fn end_paren_expr(&mut self) { ... } fn suffix(&mut self, _suf: &Suffix) -> Result<bool, E> { ... } fn comment(&mut self, _comment: &CommentStat) { ... } fn error(&mut self, e: E, _source: &Source) -> Result<(), E> { ... }
}

Provided Methods§

Source

fn stat_sep(&mut self)

Source

fn begin_if(&mut self, _cond: &Expr) -> Result<bool, E>

Source

fn then(&mut self, _block: &Block) -> Result<bool, E>

Source

fn begin_else_if(&mut self, _cond: &Expr) -> Result<bool, E>

Source

fn begin_else(&mut self, _block: &Block) -> Result<bool, E>

Source

fn end_if(&mut self)

Source

fn begin_while(&mut self, _cond: &Expr) -> Result<bool, E>

Source

fn begin_while_block(&mut self, _block: &Block) -> Result<bool, E>

Source

fn end_while(&mut self)

Source

fn begin_do_block(&mut self, _block: &Block) -> Result<bool, E>

Source

fn end_do_block(&mut self)

Source

fn for_num(&mut self, _fornum: &ForNum) -> Result<bool, E>

Source

fn for_list(&mut self, _forlist: &ForList) -> Result<bool, E>

Source

fn begin_for_block(&mut self, _block: &Block) -> Result<bool, E>

Source

fn end_for(&mut self)

Source

fn begin_repeat(&mut self, _block: &Block) -> Result<bool, E>

Source

fn until(&mut self)

Source

fn end_repeat(&mut self)

Source

fn func(&mut self, _funcstat: &FuncStat)

Source

fn local_stat(&mut self, _stat: &LocalStat) -> Result<(), E>

Source

fn label_stat(&mut self, _stat: &LabelStat) -> Result<(), E>

Source

fn ret_stat(&mut self, _stat: &RetStat) -> Result<(), E>

Source

fn break_stat(&mut self, _stat: &BreakStat) -> Result<(), E>

Source

fn goto_stat(&mut self, _stat: &GotoStat) -> Result<(), E>

Source

fn assign_stat(&mut self, _stat: &AssignStat) -> Result<(), E>

Source

fn call_stat(&mut self, _stat: &CallStat) -> Result<(), E>

Source

fn expr(&mut self, _stat: &Expr) -> Result<bool, E>

Source

fn expr_sep(&mut self)

Source

fn nil(&mut self)

Source

fn true_(&mut self)

Source

fn false_(&mut self)

Source

fn float(&mut self, _f: FloatType)

Source

fn int(&mut self, _i: IntType)

Source

fn string(&mut self, _s: &str)

Source

fn vararg(&mut self)

Source

fn anonymous_func(&mut self)

Source

fn begin_func_body(&mut self, _body: &FuncBody) -> Result<bool, E>

Source

fn end_func_body(&mut self)

Source

fn begin_table(&mut self, _t: &Table) -> Result<bool, E>

Source

fn end_table(&mut self, _t: &Table)

Source

fn field_sep(&mut self)

Source

fn begin_rec_field(&mut self, _field: &RecField) -> Result<bool, E>

Source

fn field_kv_sep(&mut self)

Source

fn begin_field_key(&mut self, _key: &FieldKey) -> Result<bool, E>

Source

fn end_field_key(&mut self, _key: &FieldKey)

Source

fn end_rec_field(&mut self)

Source

fn begin_bin_expr(&mut self, _expr: &BinExpr) -> Result<bool, E>

Source

fn binop(&mut self, _op: BinOp)

Source

fn end_bin_expr(&mut self)

Source

fn begin_un_expr(&mut self, _expr: &UnExpr) -> Result<bool, E>

Source

fn unop(&mut self, _op: UnOp)

Source

fn end_un_expr(&mut self)

Source

fn begin_suffixed_expr(&mut self, _expr: &SuffixedExpr) -> Result<bool, E>

Source

fn end_suffixed_expr(&mut self)

Source

fn name(&mut self, _name: &str)

Source

fn attr(&mut self, _attr: &str)

Source

fn method(&mut self, _method: &str)

Source

fn begin_index(&mut self, _expr: &Expr) -> Result<bool, E>

Source

fn end_index(&mut self)

Source

fn begin_func_args(&mut self, _args: &FuncArgs) -> Result<bool, E>

Source

fn end_func_args(&mut self)

Source

fn begin_paren_expr(&mut self, _expr: &Expr) -> Result<bool, E>

Source

fn end_paren_expr(&mut self)

Source

fn suffix(&mut self, _suf: &Suffix) -> Result<bool, E>

Source

fn comment(&mut self, _comment: &CommentStat)

Source

fn error(&mut self, e: E, _source: &Source) -> Result<(), E>

Implementors§