Struct erg_parser::ast::VarName
source · pub struct VarName(_);
Expand description
symbol as a left value
Implementations§
source§impl VarName
impl VarName
pub const fn new(symbol: Token) -> Self
pub const fn from_static(symbol: &'static str) -> Self
pub fn from_str(symbol: Str) -> Self
pub fn from_str_and_line(symbol: Str, line: u32) -> Self
pub fn is_const(&self) -> bool
pub fn is_procedural(&self) -> bool
pub fn is_raw(&self) -> bool
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)
Trait Implementations§
source§impl Locational for VarName
impl Locational for VarName
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.