Skip to content

Commit 14963c8

Browse files
committed
feat: added fast parsing
1 parent 562b66f commit 14963c8

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

compiler/ast/src/operators.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ pub fn parse_math_operator(tokens: &Vec<LexerToken>, ind: &mut usize) -> Diagnos
2323

2424
*ind += 1;
2525

26-
return Ok(MathOperator { operator: op, assigns, fast: false });
26+
let fast = match tokens[*ind].tok_type {
27+
LexerTokenType::Tidle => true,
28+
_ => false
29+
};
30+
31+
*ind += 1;
32+
33+
return Ok(MathOperator { operator: op, assigns, fast });
2734
}
2835

2936
pub fn parse_compare_operator(tokens: &Vec<LexerToken>, ind: &mut usize) -> DiagnosticResult<ComparingOperator> {

0 commit comments

Comments
 (0)