update std lib to use error type and global variables

This commit is contained in:
Andrew Kelley
2016-01-24 22:53:00 -07:00
parent 29a83f648b
commit bcb18338cd
10 changed files with 295 additions and 302 deletions

View File

@@ -1,10 +1,10 @@
#version("2.0.0")
export library "mathtest";
export fn add(a: i32, b: i32) -> i32 {
export fn add(a: i32, b: i32) i32 => {
a + b
}
export fn hang() -> unreachable {
entry: goto entry;
export fn hang() unreachable => {
while (true) { }
}