rl_lang/checker/operators/
mod.rs1mod binary;
4mod index_assign;
5mod unary;
6
7use crate::lexer::tokentypes::TokenType;
8
9pub fn op_str(op: &TokenType) -> &'static str {
11 match op {
12 TokenType::Plus => "+",
13 TokenType::Minus => "-",
14 TokenType::Star => "*",
15 TokenType::Slash => "/",
16 TokenType::Less => "<",
17 TokenType::Greater => ">",
18 TokenType::LessEqual => "<=",
19 TokenType::GreaterEqual => ">=",
20 TokenType::Compare => "==",
21 TokenType::BangEqual => "!=",
22 _ => "?",
23 }
24}