Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Maiori44 committed Jan 30, 2024
1 parent 33cad4f commit f85c652
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions core/src/scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ pub enum TokenType {
ROUND_BRACKET_OPEN, ROUND_BRACKET_CLOSED, SQUARE_BRACKET_OPEN,
SQUARE_BRACKET_CLOSED, CURLY_BRACKET_OPEN, CURLY_BRACKET_CLOSED,
SAFE_CALL, COMMA, SAFE_SQUARE_BRACKET, SEMICOLON, QUESTION_MARK,
NOT, AND, OR, PLUS, MINUS, STAR, SLASH, FLOOR_DIVISION,
PERCENTUAL, CARET, HASHTAG, COALESCE, DOT, DOUBLE_COLON, TWODOTS,
COLON, THREEDOTS, ARROW, SAFE_DOT, SAFE_DOUBLE_COLON,
BIT_AND, BIT_OR, BIT_XOR, BIT_NOT, LEFT_SHIFT, RIGHT_SHIFT,

//definition and comparison
DOT, DOUBLE_COLON, TWODOTS, COLON, THREEDOTS, ARROW, SAFE_DOT,
SAFE_DOUBLE_COLON, NOT, BIT_NOT, STAR, SLASH, PERCENTUAL, PERCENTUAL,
PLUS, MINUS, LEFT_SHIFT, RIGHT_SHIFT, SMALLER, SMALLER_EQUAL,
BIGGER, BIGGER_EQUAL, EQUAL, NOT_EQUAL, BIT_AND, BIT_XOR, BIT_OR,
AND, OR, FLOOR_DIVISION, CARET, HASHTAG, COALESCE, BIT_AND, BIT_XOR, BIT_OR,
DEFINE, DEFINE_AND, DEFINE_OR, INCREASE, DECREASE, MULTIPLY, DIVIDE,
DEFINE_COALESCE, EXPONENTIATE, CONCATENATE, MODULATE,
BIGGER, BIGGER_EQUAL, SMALLER, SMALLER_EQUAL, EQUAL, NOT_EQUAL,

//literals
IDENTIFIER, NUMBER, STRING,
Expand Down Expand Up @@ -91,6 +89,10 @@ impl Token {
column,
}
}

pub fn is_op(&self) -> bool {
self.kind >= NOT && self.kind <= OR
}
}

/// A token that has a raw pointer to a [`Token`].
Expand Down

0 comments on commit f85c652

Please sign in to comment.