From 931cbe657ccdcfefe4077cd7371f1ea4ad4e5b53 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 28 Sep 2025 10:35:44 +0900 Subject: feat: implement |=, &=, ^=, <<= and >>= operators --- src/parse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/parse.c') diff --git a/src/parse.c b/src/parse.c index da1345d..ba9b7e5 100644 --- a/src/parse.c +++ b/src/parse.c @@ -801,7 +801,8 @@ static AstNode* parse_assignment_expr(Parser* p) { TokenKind op = peek_token(p)->kind; // TODO: check if the lhs is unary expression. if (op == TokenKind_assign || op == TokenKind_assign_mul || op == TokenKind_assign_div || - op == TokenKind_assign_mod) { + op == TokenKind_assign_mod || op == TokenKind_assign_or || op == TokenKind_assign_and || + op == TokenKind_assign_xor || op == TokenKind_assign_lshift || op == TokenKind_assign_rshift) { next_token(p); AstNode* rhs = parse_assignment_expr(p); lhs = ast_new_assign_expr(op, lhs, rhs); -- cgit v1.2.3-70-g09d2