pub fn from_keyword(ident: &str) -> Option<Self> {
        match ident {
            "abstract" => Some(Self::Abstract),
            "alignof" => Some(Self::AlignOf),
            "as" => Some(Self::As),
            "async" => Some(Self::Async),
            "await" => Some(Self::Await),
            "become" => Some(Self::Become),
            "break" => Some(Self::Break),
            "const" => Some(Self::Const),
            "continue" => Some(Self::Continue),
            "crate" => Some(Self::Crate),
            "default" => Some(Self::Default),
            "do" => Some(Self::Do),
            "else" => Some(Self::Else),
            "enum" => Some(Self::Enum),
            "extern" => Some(Self::Extern),
            "false" => Some(Self::False),
            "final" => Some(Self::Final),
            "fn" => Some(Self::Fn),
            "for" => Some(Self::For),
            "if" => Some(Self::If),
            "impl" => Some(Self::Impl),
            "in" => Some(Self::In),
            "is" => Some(Self::Is),
            "let" => Some(Self::Let),
            "loop" => Some(Self::Loop),
            "macro" => Some(Self::Macro),
            "match" => Some(Self::Match),
            "mod" => Some(Self::Mod),
            "move" => Some(Self::Move),
            "not" => Some(Self::Not),
            "offsetof" => Some(Self::OffsetOf),
            "override" => Some(Self::Override),
            "priv" => Some(Self::Priv),
            "proc" => Some(Self::Proc),
            "pub" => Some(Self::Pub),
            "pure" => Some(Self::Pure),
            "ref" => Some(Self::Ref),
            "return" => Some(Self::Return),
            "select" => Some(Self::Select),
            "Self" => Some(Self::SelfType),
            "self" => Some(Self::SelfValue),
            "sizeof" => Some(Self::SizeOf),
            "static" => Some(Self::Static),
            "struct" => Some(Self::Struct),
            "super" => Some(Self::Super),
            "true" => Some(Self::True),
            "typeof" => Some(Self::TypeOf),
            "unsafe" => Some(Self::Unsafe),
            "use" => Some(Self::Use),
            "virtual" => Some(Self::Virtual),
            "while" => Some(Self::While),
            "yield" => Some(Self::Yield),
            _ => None,
        }
    }
/// Try to convert an identifier into a keyword.
Try to convert an identifier into a keyword.
Try to convert an identifier into a keyword .
pub fn from_keyword(ident: &str) -> Option<Self> {
        match ident {
            "abstract" => Some(Self::Abstract),
            "alignof" => Some(Self::AlignOf),
            "as" => Some(Self::As),
            "async" => Some(Self::Async),
            "await" => Some(Self::Await),
            "become" => Some(Self::Become),
            "break" => Some(Self::Break),
            "const" => Some(Self::Const),
            "continue" => Some(Self::Continue),
            "crate" => Some(Self::Crate),
            "default" => Some(Self::Default),
            "do" => Some(Self::Do),
            "else" => Some(Self::Else),
            "enum" => Some(Self::Enum),
            "extern" => Some(Self::Extern),
            "false" => Some(Self::False),
            "final" => Some(Self::Final),
            "fn" => Some(Self::Fn),
            "for" => Some(Self::For),
            "if" => Some(Self::If),
            "impl" => Some(Self::Impl),
            "in" => Some(Self::In),
            "is" => Some(Self::Is),
            "let" => Some(Self::Let),
            "loop" => Some(Self::Loop),
            "macro" => Some(Self::Macro),
            "match" => Some(Self::Match),
            "mod" => Some(Self::Mod),
            "move" => Some(Self::Move),
            "not" => Some(Self::Not),
            "offsetof" => Some(Self::OffsetOf),
            "override" => Some(Self::Override),
            "priv" => Some(Self::Priv),
            "proc" => Some(Self::Proc),
            "pub" => Some(Self::Pub),
            "pure" => Some(Self::Pure),
            "ref" => Some(Self::Ref),
            "return" => Some(Self::Return),
            "select" => Some(Self::Select),
            "Self" => Some(Self::SelfType),
            "self" => Some(Self::SelfValue),
            "sizeof" => Some(Self::SizeOf),
            "static" => Some(Self::Static),
            "struct" => Some(Self::Struct),
            "super" => Some(Self::Super),
            "true" => Some(Self::True),
            "typeof" => Some(Self::TypeOf),
            "unsafe" => Some(Self::Unsafe),
            "use" => Some(Self::Use),
            "virtual" => Some(Self::Virtual),
            "while" => Some(Self::While),
            "yield" => Some(Self::Yield),
            _ => None,
        }
    }
pub fn from_keyword ( ident : & str ) -> Option < Self > { match ident { " " => Some ( Self :: Abstract ) , " " => Some ( Self :: AlignOf ) , " " => Some ( Self :: As ) , " " => Some ( Self :: Async ) , " " => Some ( Self :: Await ) , " " => Some ( Self :: Become ) , " " => Some ( Self :: Break ) , " " => Some ( Self :: Const ) , " " => Some ( Self :: Continue ) , " " => Some ( Self :: Crate ) , " " => Some ( Self :: Default ) , " " => Some ( Self :: Do ) , " " => Some ( Self :: Else ) , " " => Some ( Self :: Enum ) , " " => Some ( Self :: Extern ) , " " => Some ( Self :: False ) , " " => Some ( Self :: Final ) , " " => Some ( Self :: Fn ) , " " => Some ( Self :: For ) , " " => Some ( Self :: If ) , " " => Some ( Self :: Impl ) , " " => Some ( Self :: In ) , " " => Some ( Self :: Is ) , " " => Some ( Self :: Let ) , " " => Some ( Self :: Loop ) , " " => Some ( Self :: Macro ) , " " => Some ( Self :: Match ) , " " => Some ( Self :: Mod ) , " " => Some ( Self :: Move ) , " " => Some ( Self :: Not ) , " " => Some ( Self :: OffsetOf ) , " " => Some ( Self :: Override ) , " " => Some ( Self :: Priv ) , " " => Some ( Self :: Proc ) , " " => Some ( Self :: Pub ) , " " => Some ( Self :: Pure ) , " " => Some ( Self :: Ref ) , " " => Some ( Self :: Return ) , " " => Some ( Self :: Select ) , " " => Some ( Self :: SelfType ) , " " => Some ( Self :: SelfValue ) , " " => Some ( Self :: SizeOf ) , " " => Some ( Self :: Static ) , " " => Some ( Self :: Struct ) , " " => Some ( Self :: Super ) , " " => Some ( Self :: True ) , " " => Some ( Self :: TypeOf ) , " " => Some ( Self :: Unsafe ) , " " => Some ( Self :: Use ) , " " => Some ( Self :: Virtual ) , " " => Some ( Self :: While ) , " " => Some ( Self :: Yield ) , _ => None , } }
Try to convert an identifier into a keyword.
Try to convert an identifier into a keyword .
ident
&str
ident
&str