summaryrefslogtreecommitdiff
path: root/test.toc
blob: 24b13b72e8442ca9b48253cb083564038c0819f7 (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
/*

#include "std/io.toc", io;
#include "std/base.toc", base;

sleep ::= #foreign("sleep", base.libc) fn(#C unsigned) #C unsigned;

main ::= fn() {
	io.io_init();
	io.file_writes(&io.std_out, "hello!\n");
	io.file_writes(&io.std_out, "goodbye!\n");
	io.file_writes(&io.std_err, "ERROR: ");
	sleep(1);
	io.file_writes(&io.std_err, "something went wrong!\n");
}
main();
*/

a ::= nms {
	#if 1 {
		test ::= 0x501;
		foo ::= fn() {
			test;
		}
	}
}