Struct erg_parser::ast::Identifier
source · pub struct Identifier {
pub vis: VisModifierSpec,
pub name: VarName,
}
Fields§
§vis: VisModifierSpec
§name: VarName
Implementations§
source§impl Identifier
impl Identifier
pub const fn new(vis: VisModifierSpec, name: VarName) -> Self
pub fn static_public(name: &'static str) -> Self
pub fn public(name: Str) -> Self
pub fn private(name: Str) -> Self
pub fn private_from_token(symbol: Token) -> Self
pub fn private_from_varname(name: VarName) -> Self
pub fn private_with_line(name: Str, line: u32) -> Self
pub fn public_with_line(dot: Token, name: Str, line: u32) -> Self
pub fn public_from_token(dot: Token, symbol: Token) -> Self
pub fn is_const(&self) -> bool
pub fn is_raw(&self) -> bool
pub fn acc_kind(&self) -> AccessModifier
pub const fn inspect(&self) -> &Str
pub fn is_procedural(&self) -> bool
pub fn trim_end_proc_mark(&mut self)
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 Expr
impl From<Identifier> for Expr
source§fn from(ident: Identifier) -> Self
fn from(ident: Identifier) -> Self
Converts to this type from the input type.
source§impl Hash for Identifier
impl Hash for Identifier
source§impl Locational for Identifier
impl Locational for Identifier
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.fn ln_begin(&self) -> Option<u32>
fn ln_end(&self) -> Option<u32>
fn col_begin(&self) -> Option<u32>
fn col_end(&self) -> Option<u32>
source§impl NestedDisplay for Identifier
impl NestedDisplay for Identifier
source§impl PartialEq<Identifier> for Identifier
impl PartialEq<Identifier> for Identifier
source§fn eq(&self, other: &Identifier) -> bool
fn eq(&self, other: &Identifier) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.