aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-05-04 22:00:08 +0900
committernsfisis <nsfisis@gmail.com>2025-05-04 22:00:08 +0900
commitc47efd763eeb55bc9b7cc81187aca3fcd3bd52a0 (patch)
tree5e66d04d9e0c5831f289fa056834f0e40845d389
parentc9a19063c3d8782dc62aad5f640d3f47186b0125 (diff)
downloadP4Dcc-c47efd763eeb55bc9b7cc81187aca3fcd3bd52a0.tar.gz
P4Dcc-c47efd763eeb55bc9b7cc81187aca3fcd3bd52a0.tar.zst
P4Dcc-c47efd763eeb55bc9b7cc81187aca3fcd3bd52a0.zip
fix greater than operator
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
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;