| author | |
| committer | |
| log | cbd76a10233a219727ef576f0dee88eb5902f798 |
| tree | f4ff3f7c9f9c3dd318b2952ca536b160746a6ef0 |
| parent | b893e32685ff6a5115a0723b9ebf142578c73416 |
2 files changed, 3 insertions(+), 0 deletions(-)
compiler/src/tokenizer.rs+1| ... | ... | @@ -123,6 +123,7 @@ pub fn tokenize(content: String) -> Result<Vec<Token>> { |
| 123 | 123 | _ => tokens.push(Token::Equals), |
| 124 | 124 | }, |
| 125 | 125 | ';' => tokens.push(Token::Semicolon), |
| 126 | '>' => tokens.push(Token::Operator(Operator::GreaterThan)), | |
| 126 | 127 | '+' => tokens.push(Token::Operator(Operator::Add)), |
| 127 | 128 | '-' => match chars.peek() { |
| 128 | 129 | Some((_, '>')) => { |
compiler/src/util.rs+2| ... | ... | @@ -6,6 +6,7 @@ pub enum Operator { |
| 6 | 6 | Divide, |
| 7 | 7 | Power, |
| 8 | 8 | Equals, |
| 9 | GreaterThan, | |
| 9 | 10 | } |
| 10 | 11 | |
| 11 | 12 | impl Operator { |
| ... | ... | @@ -17,6 +18,7 @@ impl Operator { |
| 17 | 18 | Self::Multiply => "*", |
| 18 | 19 | Self::Power => "**", |
| 19 | 20 | Self::Equals => "===", |
| 21 | Self::GreaterThan => ">", | |
| 20 | 22 | }) |
| 21 | 23 | } |
| 22 | 24 | } |