binary expressions are working fully now

This commit is contained in:
2024-11-22 17:24:58 -07:00
parent e9675cd5d2
commit b5ee169a75
9 changed files with 203 additions and 50 deletions

View File

@@ -122,12 +122,14 @@ pub enum Symbol {
LessThanOrEqual,
/// Represents the `>=` symbol
GreaterThanOrEqual,
/// Represents the `**` symbol
Exp,
}
impl Symbol {
pub fn is_operator(&self) -> bool {
match self {
Symbol::Plus | Symbol::Minus | Symbol::Asterisk | Symbol::Slash | Symbol::Caret => true,
Symbol::Plus | Symbol::Minus | Symbol::Asterisk | Symbol::Slash | Symbol::Exp => true,
_ => false,
}
}