Skip to content

Commit

Permalink
fix: <<= token parse. (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
Peefy committed May 19, 2023
1 parent 8cf533f commit c83b5d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kclvm/lexer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ impl<'a> ITokenCursor for Cursor<'a> {
match self.peek() {
'=' => {
self.bump();
LtEq
LtLtEq
}
_ => LtLt,
}
Expand Down
2 changes: 1 addition & 1 deletion kclvm/lexer/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ $
Token { kind: Newline, len: 1 }
Token { kind: SlashSlashEq, len: 3 }
Token { kind: Newline, len: 1 }
Token { kind: LtEq, len: 3 }
Token { kind: LtLtEq, len: 3 }
Token { kind: Newline, len: 1 }
Token { kind: GtGtEq, len: 3 }
Token { kind: Newline, len: 1 }
Expand Down
2 changes: 1 addition & 1 deletion kclvm/parser/src/lexer/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ $
Token { kind: Newline, span: Span { base_or_index: 108, len_or_tag: 1 } }
Token { kind: BinOpEq(SlashSlash), span: Span { base_or_index: 109, len_or_tag: 3 } }
Token { kind: Newline, span: Span { base_or_index: 112, len_or_tag: 1 } }
Token { kind: BinCmp(LtEq), span: Span { base_or_index: 113, len_or_tag: 3 } }
Token { kind: BinOpEq(Shl), span: Span { base_or_index: 113, len_or_tag: 3 } }
Token { kind: Newline, span: Span { base_or_index: 116, len_or_tag: 1 } }
Token { kind: BinOpEq(Shr), span: Span { base_or_index: 117, len_or_tag: 3 } }
Token { kind: Newline, span: Span { base_or_index: 120, len_or_tag: 1 } }
Expand Down

0 comments on commit c83b5d0

Please sign in to comment.