Enum erg_compiler::hir::Expr
source · pub enum Expr {
}
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)
AttrDef(AttrDef)
TypeAsc(TypeAscription)
Code(Block)
Compound(Block)
Import(Accessor)
Implementations
sourceimpl 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!”)
pub fn is_type_asc(&self) -> bool
pub fn call(self, args: Args) -> Call
pub fn call_expr(self, args: Args) -> Self
pub fn attr(self, ident: Identifier) -> Accessor
pub fn attr_expr(self, ident: Identifier) -> Self
pub fn type_asc(self, t_spec: TypeSpec) -> TypeAscription
pub fn type_asc_expr(self, t_spec: TypeSpec) -> Self
Trait Implementations
sourceimpl Locational for Expr
impl Locational for Expr
sourceimpl NestedDisplay for Expr
impl NestedDisplay for Expr
sourceimpl Stream<Expr> for Block
impl Stream<Expr> for Block
fn payload(self) -> Vec<Expr>
fn ref_payload(&self) -> &Vec<Expr>
fn ref_mut_payload(&mut self) -> &mut Vec<Expr>
fn clear(&mut self)
fn len(&self) -> usize
fn size(&self) -> usize
fn is_empty(&self) -> bool
fn insert(&mut self, idx: usize, elem: T)
fn remove(&mut self, idx: usize) -> T
fn push(&mut self, elem: T)
fn append<S>(&mut self, s: &mut S)where
S: Stream<T>,
fn pop(&mut self) -> Option<T>
fn lpop(&mut self) -> Option<T>
fn get(&self, idx: usize) -> Option<&T>
fn get_mut(&mut self, idx: usize) -> Option<&mut T>
fn first(&self) -> Option<&T>
fn first_mut(&mut self) -> Option<&mut T>
fn last(&self) -> Option<&T>
fn last_mut(&mut self) -> Option<&mut T>
fn iter(&self) -> Iter<'_, T>
fn iter_mut(&mut self) -> IterMut<'_, T>
fn into_iter(self) -> IntoIter<T, Global>
fn take_all(&mut self) -> Vec<T, Global>
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
sourceimpl Stream<Expr> for Module
impl Stream<Expr> for Module
fn payload(self) -> Vec<Expr>
fn ref_payload(&self) -> &Vec<Expr>
fn ref_mut_payload(&mut self) -> &mut Vec<Expr>
fn clear(&mut self)
fn len(&self) -> usize
fn size(&self) -> usize
fn is_empty(&self) -> bool
fn insert(&mut self, idx: usize, elem: T)
fn remove(&mut self, idx: usize) -> T
fn push(&mut self, elem: T)
fn append<S>(&mut self, s: &mut S)where
S: Stream<T>,
fn pop(&mut self) -> Option<T>
fn lpop(&mut self) -> Option<T>
fn get(&self, idx: usize) -> Option<&T>
fn get_mut(&mut self, idx: usize) -> Option<&mut T>
fn first(&self) -> Option<&T>
fn first_mut(&mut self) -> Option<&mut T>
fn last(&self) -> Option<&T>
fn last_mut(&mut self) -> Option<&mut T>
fn iter(&self) -> Iter<'_, T>
fn iter_mut(&mut self) -> IterMut<'_, T>
fn into_iter(self) -> IntoIter<T, Global>
fn take_all(&mut self) -> Vec<T, Global>
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
impl Eq for Expr
impl StructuralEq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations
impl !RefUnwindSafe for Expr
impl !Send for Expr
impl !Sync for Expr
impl Unpin for Expr
impl !UnwindSafe for Expr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more