aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-04-02 13:08:06 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-04-02 13:08:06 -0400
commitc73e96ff916209d74e2be9bd7d8de3758685ce4d (patch)
tree8f902fea5b6790061e48600243f0f8faeded32dd /typecheck.c
parentb6534ce34706d1a98584e5f916107d91da072346 (diff)
Add comparison operator <> and array method to sort by a custom
comparison function
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/typecheck.c b/typecheck.c
index 6f92374f..f876851e 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -652,6 +652,8 @@ type_t *get_type(env_t *env, ast_t *ast)
code_err(ast, "I can't compare these two different types: %T vs %T", lhs_t, rhs_t);
return Type(BoolType);
}
+ case BINOP_CMP:
+ return Type(IntType, .bits=32);
case BINOP_POWER: {
type_t *result = get_math_type(env, ast, lhs_t, rhs_t);
if (result->tag == NumType)