Initial commit

This commit is contained in:
2026-07-06 11:34:44 -04:00
commit e57e319dec
10 changed files with 286 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
use super::Token;
#[derive(Debug)]
pub enum Symbol {
EqualSign,
Semicolon,
}
pub fn parse_symbol(input: &str) -> Option<(Token, &str)> {
let c: char = input.chars().next()?;
let input = &input[1..];
match c {
'=' => Some((Token::Sym(Symbol::EqualSign), input)),
';' => Some((Token::Sym(Symbol::Semicolon), input)),
_ => None
}
}