start structs

This commit is contained in:
nora 2023-07-31 23:39:52 +02:00
parent 924236532c
commit b0b92dae0f
8 changed files with 331 additions and 30 deletions

View file

@ -15,10 +15,21 @@ import { Ids } from "./utils";
const INPUT = `
extern mod std;
type A = { a: String };
type A = { a: Int };
function main() = (
std.rt.allocateItem(0_I32, 0_I32);
let a = A { a: 100 };
printA(a);
);
function printA(a: A) = (
print("ABCDEFGH\\n");
std.printlnInt(a.a);
print("ABCDEFGH\\n");
);
function linkStd() = (
std.println("a");
);
`;