Implement parser using Pratt parsing

This commit is contained in:
cdo committed 2026-09-26 09:42:37 +01:00
1 parent aad169c24f
commit a9f737a1ad
3 files changed
+499

No files matched your search

+11
View File
@@ -10,3 +10,14 @@ pub enum Token {
Divide,
Caret,
}
impl Token {
pub fn starts_expression(&self) -> bool {
match self {
Token::OpenParen => true,
Token::Symbol(_) => true,
Token::Integer(_) => true,
_ => false,
}
}
}