aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-18 01:27:25 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-18 01:27:25 -0500
commiteabff011ea552a4fecc13de129e0a205b77bc289 (patch)
tree21fd0c14e9d7dcadab6d3e3339193476eb850793 /typecheck.c
parent733ebfd234906aac08a66e6c2ebe7ed2a0c4d375 (diff)
Add in '#' operator for length
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/typecheck.c b/typecheck.c
index ba72b74a..6f86f891 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -368,6 +368,7 @@ type_t *get_type(env_t *env, ast_t *ast)
return Type(AbortType);
}
case Pass: return Type(VoidType);
+ case Length: return Type(IntType, .bits=64);
case Negative: {
type_t *t = get_type(env, Match(ast, Negative)->value);
if (t->tag == IntType || t->tag == NumType)