aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-13 01:30:25 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-13 01:30:25 -0400
commitd08f795794b33a5d52e39c6b9f0c4e6e88fede3d (patch)
tree7267e0828b73685f9af0c3e9cf58212c45af289c /typecheck.c
parentc1c889b024529ac754f83caec4cc15971123d07b (diff)
Partially working first draft of bigints
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/typecheck.c b/typecheck.c
index 6616b38f..3e657dfa 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -1,6 +1,7 @@
// Logic for getting a type from an AST node
#include <ctype.h>
#include <gc.h>
+#include <gmp.h>
#include <signal.h>
#include <stdarg.h>
#include <stdlib.h>
@@ -828,7 +829,7 @@ type_t *get_type(env_t *env, ast_t *ast)
return Type(AbortType);
}
case Pass: case Defer: return Type(VoidType);
- case Length: return Type(IntType, .bits=64);
+ case Length: return INT_TYPE;
case Negative: {
ast_t *value = Match(ast, Negative)->value;
type_t *t = get_type(env, value);