mirror of
https://github.com/Noratrieb/riverdelta.git
synced 2026-01-15 00:45:04 +01:00
start structs
This commit is contained in:
parent
924236532c
commit
b0b92dae0f
8 changed files with 331 additions and 30 deletions
15
src/index.ts
15
src/index.ts
|
|
@ -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");
|
||||
);
|
||||
`;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue