blob: cccc4e6634fc4f037187508658c22e76cc6078b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
structures forward-declare then emit their full definition
in topological dependency order.
an alias to a struct emits as a c typedef.
primitives are resolved to c directly on use.
<<<
Point = type { x int, y int }
Node = type { value int, next &Node }
Coord = type Point
main = fun () {
}
>>>
#include "core.c"
struct Point;
struct Node;
struct Point {
integer x;
integer y;
};
struct Node {
integer value;
struct Node* next;
};
typedef struct Point Coord;
void catskill_main(void);
void catskill_main(void) {
}
#include "runtime.c"
|