blob: d1f60f0b71bcce8c5d2e38a5768e266cdb59ae06 [file] [log] [blame] [edit]
//! A set of utils methods to reuse on other abstraction levels
use crate::SyntaxKind;
#[inline]
pub fn is_raw_identifier(name: &str, edition: parser::Edition) -> bool {
let is_keyword = SyntaxKind::from_keyword(name, edition).is_some();
is_keyword && !matches!(name, "self" | "crate" | "super" | "Self")
}