diff options
Diffstat (limited to 'compiler/lexer.cup')
| -rw-r--r-- | compiler/lexer.cup | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/lexer.cup b/compiler/lexer.cup index 9e967f8..e6d0c0b 100644 --- a/compiler/lexer.cup +++ b/compiler/lexer.cup @@ -138,12 +138,16 @@ fn lexer_next(lexer: Lexer*, token: Token*) { } else if (c == '<') { + if (lexer_peek_char(lexer, 1) == '<') + return lexer_make_token(lexer, token, TOKEN_LSHIFT, 2); if (lexer_peek_char(lexer, 1) == '=') return lexer_make_token(lexer, token, TOKEN_LEQ, 2); return lexer_make_token(lexer, token, TOKEN_LT, 1); } else if (c == '>') { + if (lexer_peek_char(lexer, 1) == '>') + return lexer_make_token(lexer, token, TOKEN_RSHIFT, 2); if (lexer_peek_char(lexer, 1) == '=') return lexer_make_token(lexer, token, TOKEN_GEQ, 2); return lexer_make_token(lexer, token, TOKEN_GT, 1); |