aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-17 17:29:56 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-17 17:29:56 -0500
commitdbd7502a1dcee6b99434f39393cb356efa542ddc (patch)
treeb8ae469719326ba2c3daf019e545c4713ab0235f /compile.c
parent5c49314ed4380f4e12a05888f635caa9af4a7cf4 (diff)
Fix up some builtins
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index c3dfb723..a230d712 100644
--- a/compile.c
+++ b/compile.c
@@ -414,4 +414,17 @@ CORD compile(env_t *env, ast_t *ast)
return NULL;
}
+// CORD compile_type_info(env_t *env, type_t *t)
+// {
+// switch (t->tag) {
+// case BoolType: return "&Bool$Info";
+// case IntType: return CORD_asprintf("&Int%ld$Info", Match(t, IntType)->bits);
+// case NumType: return CORD_asprintf("&Num%ld$Info", Match(t, NumType)->bits);
+// case StringType: return CORD_all("&", Match(t, StringType)->dsl ? Match(t, StringType)->dsl : "Str", "$Info");
+// case StructType: return CORD_all("&", Match(t, StructType)->name, "$Info");
+// case EnumType: return CORD_all("&", Match(t, EnumType)->name, "$Info");
+// case ArrayType: return CORD_all("&((TypeInfo){", Match(t, EnumType)->name, "$Info");
+// }
+// }
+
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0