mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 20:34:44 +00:00
Add raw identifier
This commit is contained in:
parent
48eb3c5920
commit
03a36f48a3
14 changed files with 137 additions and 26 deletions
|
@ -2018,6 +2018,10 @@ impl VarName {
|
|||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
pub fn is_raw(&self) -> bool {
|
||||
self.0.content.starts_with('\'')
|
||||
}
|
||||
|
||||
pub const fn token(&self) -> &Token {
|
||||
&self.0
|
||||
}
|
||||
|
@ -2094,6 +2098,10 @@ impl Identifier {
|
|||
self.name.is_const()
|
||||
}
|
||||
|
||||
pub fn is_raw(&self) -> bool {
|
||||
self.name.is_raw()
|
||||
}
|
||||
|
||||
pub const fn vis(&self) -> Visibility {
|
||||
match &self.dot {
|
||||
Some(_) => Visibility::Public,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue