Struct erg_compiler::hir::Identifier
source · pub struct Identifier {
pub dot: Option<Token>,
pub name: VarName,
pub qual_name: Option<Str>,
pub vi: VarInfo,
}
Fields§
§dot: Option<Token>
§name: VarName
§qual_name: Option<Str>
§vi: VarInfo
Implementations§
source§impl Identifier
impl Identifier
pub const fn new(
dot: Option<Token>,
name: VarName,
qual_name: Option<Str>,
vi: VarInfo
) -> Self
pub fn public(name: &'static str) -> Self
pub fn private(name: &'static str) -> Self
pub fn private_with_line(name: Str, line: usize) -> Self
pub fn public_with_line(dot: Token, name: Str, line: usize) -> Self
pub const fn bare(dot: Option<Token>, name: VarName) -> Self
pub fn is_py_api(&self) -> bool
pub fn is_const(&self) -> bool
pub const fn vis(&self) -> Visibility
pub const fn inspect(&self) -> &Str
sourcepub fn to_string_without_type(&self) -> String
pub fn to_string_without_type(&self) -> String
show dot + name (no qual_name & type)
pub fn is_procedural(&self) -> bool
pub fn downcast(self) -> Identifier
Trait Implementations§
source§impl Clone for Identifier
impl Clone for Identifier
source§fn clone(&self) -> Identifier
fn clone(&self) -> Identifier
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Identifier
impl Debug for Identifier
source§impl Display for Identifier
impl Display for Identifier
source§impl From<&Identifier> for Field
impl From<&Identifier> for Field
source§fn from(ident: &Identifier) -> Self
fn from(ident: &Identifier) -> Self
Converts to this type from the input type.