Add raw identifier

This commit is contained in:
Shunsuke Shibayama 2022-10-20 18:53:35 +09:00
parent 48eb3c5920
commit 03a36f48a3
14 changed files with 137 additions and 26 deletions

View file

@ -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,