From 5a16856f8ff4dbf801b4a622ca7053b77e8a0214 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 28 Sep 2025 15:30:11 +0900 Subject: feat: implement bitwise not operator --- src/parse.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/parse.c') diff --git a/src/parse.c b/src/parse.c index 80c7aac..b82c45d 100644 --- a/src/parse.c +++ b/src/parse.c @@ -547,6 +547,9 @@ static AstNode* parse_prefix_expr(Parser* p) { } else if (consume_token_if(p, TokenKind_not)) { AstNode* operand = parse_prefix_expr(p); return ast_new_unary_expr(op, operand); + } else if (consume_token_if(p, TokenKind_tilde)) { + AstNode* operand = parse_prefix_expr(p); + return ast_new_unary_expr(op, operand); } else if (consume_token_if(p, TokenKind_and)) { AstNode* operand = parse_prefix_expr(p); return ast_new_ref_expr(operand); -- cgit v1.2.3-70-g09d2