Struct erg_parser::ast::VarName
source · pub struct VarName(/* private fields */);
Expand description
symbol as a left value
Implementations§
source§impl VarName
impl VarName
pub fn __repr__(&self) -> String
pub fn __str__(&self) -> String
pub const fn new(symbol: Token) -> Self
pub fn from_str(symbol: Str) -> Self
pub fn from_str_and_line(symbol: Str, line: u32) -> Self
pub fn from_str_and_loc(symbol: Str, loc: Location) -> Self
pub fn is_const(&self) -> bool
pub fn is_discarded(&self) -> bool
pub fn is_procedural(&self) -> bool
pub fn is_raw(&self) -> bool
pub fn is_generated(&self) -> bool
source§impl VarName
impl VarName
pub const fn from_static(symbol: &'static str) -> Self
pub const fn token(&self) -> &Token
pub fn into_token(self) -> Token
sourcepub fn trim_end_proc_mark(&mut self)
pub fn trim_end_proc_mark(&mut self)
Remove !
from the end of the identifier.
Procedures defined in d.er
automatically register the name without !
as py_name
.
This method is for undoing it (e.g. pylyzer-mode)
pub fn rename(&mut self, new: Str)
Trait Implementations§
source§impl Locational for VarName
impl Locational for VarName
source§impl PartialEq for VarName
impl PartialEq for VarName
impl Eq for VarName
Auto Trait Implementations§
impl Freeze for VarName
impl RefUnwindSafe for VarName
impl Send for VarName
impl Sync for VarName
impl Unpin for VarName
impl UnwindSafe for VarName
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