This commit is contained in:
2026-04-08 17:53:21 -04:00
parent 11ab9285f1
commit 867f9e51bd
139 changed files with 895 additions and 10886 deletions
+24
View File
@@ -0,0 +1,24 @@
use super::*;
#[derive(Debug, Clone, PartialEq)]
pub enum Keyword {
Let,
Fn,
}
impl Keyword {
pub fn parse(ident: &str) -> Option<Self> {
Some(match ident {
"let" => Self::Let,
"fn" => Self::Fn,
_ => return None,
})
}
}
impl From<Keyword> for Token {
fn from(value: Keyword) -> Self {
Token::Keyword(value)
}
}