aboutsummaryrefslogtreecommitdiffhomepage
path: root/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ast.c b/ast.c
index 0326855..83f65d9 100644
--- a/ast.c
+++ b/ast.c
@@ -43,6 +43,10 @@ Type* type_new_array(Type* elem, int size) {
return ty;
}
+Type* type_new_static_string(int len) {
+ return type_new_array(type_new(TypeKind_char), len + 1);
+}
+
Type* type_array_to_ptr(Type* ty) {
return type_new_ptr(ty->to);
}