Enum erg_compiler::hir::Accessor
source · pub enum Accessor {
Ident(Identifier),
Attr(Attribute),
}
Variants§
Ident(Identifier)
Attr(Attribute)
Implementations§
source§impl Accessor
impl Accessor
pub fn private_with_line(name: Str, line: u32) -> Self
pub fn public_with_line(name: Str, line: u32) -> Self
pub const fn private(name: Token, vi: VarInfo) -> Self
pub fn public(name: Token, vi: VarInfo) -> Self
pub fn attr(obj: Expr, ident: Identifier) -> Self
pub fn var_info(&self) -> &VarInfo
pub fn show(&self) -> String
pub fn is_py_api(&self) -> bool
pub fn qual_name(&self) -> Option<&str>
pub fn local_name(&self) -> Option<&str>
Trait Implementations§
source§impl HasType for Accessor
impl HasType for Accessor
fn ref_t(&self) -> &Type
fn ref_mut_t(&mut self) -> &mut Type
fn signature_t(&self) -> Option<&Type>
fn signature_mut_t(&mut self) -> Option<&mut Type>
fn t(&self) -> Type
fn inner_ts(&self) -> Vec<Type>
fn lhs_t(&self) -> &Type
fn rhs_t(&self) -> &Type
source§impl Locational for Accessor
impl Locational for Accessor
source§fn loc(&self) -> Location
fn loc(&self) -> Location
NOTE:
loc
cannot be treated as a light method when self
is a large grammatical element.
If possible, delay the computation by passing &impl Locational
or other means.