add raw pointers

This commit is contained in:
nora 2023-08-05 14:20:24 +02:00
parent 5bac67b84c
commit 64d81b5608
8 changed files with 101 additions and 29 deletions

View file

@ -214,6 +214,8 @@ function printType(type: Type<AnyPhase>): string {
return `[${printType(type.elem)}]`;
case "tuple":
return `(${type.elems.map(printType).join(", ")})`;
case "rawptr":
return `*${printType(type.inner)}`;
case "never":
return "!";
}
@ -266,6 +268,9 @@ export function printTy(ty: Ty): string {
case "struct": {
return ty._name;
}
case "rawptr": {
return `*${printTy(ty.inner)}`;
}
case "never": {
return "!";
}