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 fn __repr__(&self) -> String
pub fn __str__(&self) -> String
pub fn is_const(&self) -> bool
pub fn is_discarded(&self) -> bool
pub fn is_raw(&self) -> bool
pub fn acc_kind(&self) -> AccessModifier
pub fn is_procedural(&self) -> bool
pub fn trim_end_proc_mark(&mut self)
pub fn set_name(&mut self, name: VarName)
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 private_with_loc(name: Str, loc: Location) -> Self
pub fn public_with_line(dot: Token, name: Str, line: u32) -> Self
pub fn public_with_loc(dot: Token, name: Str, loc: Location) -> Self
pub fn public_from_token(dot: Token, symbol: Token) -> Self
pub fn auto(name: Str) -> Self
source§impl Identifier
impl Identifier
pub fn static_public(name: &'static str) -> Self
pub const fn new(vis: VisModifierSpec, name: VarName) -> Self
pub const fn inspect(&self) -> &Str
pub fn call1(self, arg: Expr) -> Call
pub fn call2(self, arg1: Expr, arg2: Expr) -> Call
pub fn call(self, args: Args) -> Call
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§impl NestedDisplay for Identifier
impl NestedDisplay for Identifier
source§impl PartialEq for Identifier
impl PartialEq for Identifier
impl Eq for Identifier
impl StructuralPartialEq for Identifier
Auto Trait Implementations§
impl Freeze for Identifier
impl RefUnwindSafe for Identifier
impl Send for Identifier
impl Sync for Identifier
impl Unpin for Identifier
impl UnwindSafe for Identifier
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)