Enum erg_compiler::hir::Expr
source · pub enum Expr {
Show 20 variants
Lit(Literal),
Accessor(Accessor),
Array(Array),
Tuple(Tuple),
Set(Set),
Dict(Dict),
Record(Record),
BinOp(BinOp),
UnaryOp(UnaryOp),
Call(Call),
Lambda(Lambda),
Def(Def),
ClassDef(ClassDef),
PatchDef(PatchDef),
ReDef(ReDef),
TypeAsc(TypeAscription),
Code(Block),
Compound(Block),
Import(Accessor),
Dummy(Dummy),
}
Variants§
Lit(Literal)
Accessor(Accessor)
Array(Array)
Tuple(Tuple)
Set(Set)
Dict(Dict)
Record(Record)
BinOp(BinOp)
UnaryOp(UnaryOp)
Call(Call)
Lambda(Lambda)
Def(Def)
ClassDef(ClassDef)
PatchDef(PatchDef)
ReDef(ReDef)
TypeAsc(TypeAscription)
Code(Block)
Compound(Block)
Import(Accessor)
Dummy(Dummy)
Implementations§
source§impl Expr
impl Expr
pub fn receiver_t(&self) -> Option<&Type>
pub fn show_acc(&self) -> Option<String>
sourcepub fn qual_name(&self) -> Option<&str>
pub fn qual_name(&self) -> Option<&str>
参照するオブジェクト自体が持っている名前(e.g. Int.qual_name == Some(“int”), Socket!.qual_name == Some(“io.Socket!”))
sourcepub fn local_name(&self) -> Option<&str>
pub fn local_name(&self) -> Option<&str>
e.g. Int.local_name == Some(“int”), Socket!.local_name == Some(“Socket!”)