aboutsummaryrefslogtreecommitdiff
path: root/compiler/parser.cup
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-02-07 23:07:57 -0500
committerMustafa Quraish <[email protected]>2022-02-08 02:07:18 -0500
commite5f2fac8c5ae5a1b74335816836872c2e24904e6 (patch)
treeed131049d39320967d8d18f65749c08ebb2f79a0 /compiler/parser.cup
parentMark bootstrap files as binary in `.gitattributes` (diff)
downloadcup-master.tar.xz
cup-master.zip
[cup] Add `>>` and `<<` operators, `fork()` buildin and `SYS_execve`HEADmaster
Diffstat (limited to 'compiler/parser.cup')
-rw-r--r--compiler/parser.cup2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/parser.cup b/compiler/parser.cup
index d57885e..d3fa64f 100644
--- a/compiler/parser.cup
+++ b/compiler/parser.cup
@@ -482,7 +482,7 @@ fn parse_additive(lexer: Lexer*): Node* {
let lhs = parse_term(lexer);
lexer_peek(lexer, &token);
- while (token.typ == TOKEN_PLUS || token.typ == TOKEN_MINUS) {
+ while (token.typ == TOKEN_PLUS || token.typ == TOKEN_MINUS || token.typ == TOKEN_LSHIFT || token.typ == TOKEN_RSHIFT) {
lexer_next(lexer, &token);
let op = node_new(binary_token_to_op(token.typ));
let rhs = parse_term(lexer);