From c47efd763eeb55bc9b7cc81187aca3fcd3bd52a0 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 4 May 2025 22:00:08 +0900 Subject: fix greater than operator --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 8ddae76..dd8fa44 100644 --- a/main.c +++ b/main.c @@ -965,7 +965,7 @@ struct AstNode* parse_relational_expr(struct Parser* p) { } else if (op == TK_GE) { next_token(p); struct AstNode* rhs = parse_additive_expr(p); - lhs = ast_new_binary_expr(TK_GE, rhs, lhs); + lhs = ast_new_binary_expr(TK_LE, rhs, lhs); lhs->ty = type_new(TY_INT); } else { break; -- cgit v1.2.3-70-g09d2