Trait go_parser::visitor::ExprVisitor
source · pub trait ExprVisitor {
type Result;
Show 22 methods
// Required methods
fn visit_expr_ident(
&mut self,
this: &Expr,
ident: &IdentKey
) -> Self::Result;
fn visit_expr_ellipsis(
&mut self,
this: &Expr,
els: &Option<Expr>
) -> Self::Result;
fn visit_expr_basic_lit(
&mut self,
this: &Expr,
blit: &BasicLit
) -> Self::Result;
fn visit_expr_func_lit(
&mut self,
this: &Expr,
flit: &FuncLit
) -> Self::Result;
fn visit_expr_composit_lit(
&mut self,
this: &Expr,
clit: &CompositeLit
) -> Self::Result;
fn visit_expr_paren(&mut self, this: &Expr, expr: &Expr) -> Self::Result;
fn visit_expr_selector(
&mut self,
this: &Expr,
expr: &Expr,
ident: &IdentKey
) -> Self::Result;
fn visit_expr_index(
&mut self,
this: &Expr,
expr: &Expr,
index: &Expr
) -> Self::Result;
fn visit_expr_slice(
&mut self,
this: &Expr,
expr: &Expr,
low: &Option<Expr>,
high: &Option<Expr>,
max: &Option<Expr>
) -> Self::Result;
fn visit_expr_type_assert(
&mut self,
this: &Expr,
expr: &Expr,
typ: &Option<Expr>
) -> Self::Result;
fn visit_expr_call(
&mut self,
this: &Expr,
func: &Expr,
args: &Vec<Expr>,
ellipsis: bool
) -> Self::Result;
fn visit_expr_star(&mut self, this: &Expr, expr: &Expr) -> Self::Result;
fn visit_expr_unary(
&mut self,
this: &Expr,
expr: &Expr,
op: &Token
) -> Self::Result;
fn visit_expr_binary(
&mut self,
this: &Expr,
left: &Expr,
op: &Token,
right: &Expr
) -> Self::Result;
fn visit_expr_key_value(
&mut self,
this: &Expr,
key: &Expr,
val: &Expr
) -> Self::Result;
fn visit_expr_array_type(
&mut self,
this: &Expr,
len: &Option<Expr>,
elm: &Expr
) -> Self::Result;
fn visit_expr_struct_type(
&mut self,
this: &Expr,
s: &StructType
) -> Self::Result;
fn visit_expr_func_type(
&mut self,
this: &Expr,
s: &FuncTypeKey
) -> Self::Result;
fn visit_expr_interface_type(
&mut self,
this: &Expr,
s: &InterfaceType
) -> Self::Result;
fn visit_map_type(
&mut self,
this: &Expr,
key: &Expr,
val: &Expr,
map: &Expr
) -> Self::Result;
fn visit_chan_type(
&mut self,
this: &Expr,
chan: &Expr,
dir: &ChanDir
) -> Self::Result;
fn visit_bad_expr(&mut self, this: &Expr, e: &BadExpr) -> Self::Result;
}
Required Associated Types§
Required Methods§
fn visit_expr_ident(&mut self, this: &Expr, ident: &IdentKey) -> Self::Result
fn visit_expr_ellipsis( &mut self, this: &Expr, els: &Option<Expr> ) -> Self::Result
fn visit_expr_basic_lit(&mut self, this: &Expr, blit: &BasicLit) -> Self::Result
fn visit_expr_func_lit(&mut self, this: &Expr, flit: &FuncLit) -> Self::Result
fn visit_expr_composit_lit( &mut self, this: &Expr, clit: &CompositeLit ) -> Self::Result
fn visit_expr_paren(&mut self, this: &Expr, expr: &Expr) -> Self::Result
fn visit_expr_selector( &mut self, this: &Expr, expr: &Expr, ident: &IdentKey ) -> Self::Result
fn visit_expr_index( &mut self, this: &Expr, expr: &Expr, index: &Expr ) -> Self::Result
fn visit_expr_slice( &mut self, this: &Expr, expr: &Expr, low: &Option<Expr>, high: &Option<Expr>, max: &Option<Expr> ) -> Self::Result
fn visit_expr_type_assert( &mut self, this: &Expr, expr: &Expr, typ: &Option<Expr> ) -> Self::Result
fn visit_expr_call( &mut self, this: &Expr, func: &Expr, args: &Vec<Expr>, ellipsis: bool ) -> Self::Result
fn visit_expr_star(&mut self, this: &Expr, expr: &Expr) -> Self::Result
fn visit_expr_unary( &mut self, this: &Expr, expr: &Expr, op: &Token ) -> Self::Result
fn visit_expr_binary( &mut self, this: &Expr, left: &Expr, op: &Token, right: &Expr ) -> Self::Result
fn visit_expr_key_value( &mut self, this: &Expr, key: &Expr, val: &Expr ) -> Self::Result
sourcefn visit_expr_array_type(
&mut self,
this: &Expr,
len: &Option<Expr>,
elm: &Expr
) -> Self::Result
fn visit_expr_array_type( &mut self, this: &Expr, len: &Option<Expr>, elm: &Expr ) -> Self::Result
codegen needs the unwraped expr
fn visit_expr_struct_type( &mut self, this: &Expr, s: &StructType ) -> Self::Result
fn visit_expr_func_type(&mut self, this: &Expr, s: &FuncTypeKey) -> Self::Result
fn visit_expr_interface_type( &mut self, this: &Expr, s: &InterfaceType ) -> Self::Result
sourcefn visit_map_type(
&mut self,
this: &Expr,
key: &Expr,
val: &Expr,
map: &Expr
) -> Self::Result
fn visit_map_type( &mut self, this: &Expr, key: &Expr, val: &Expr, map: &Expr ) -> Self::Result
codegen needs the unwraped expr