zig/example/shared_library/mathtest.zig
Jimmi Holst Christensen 8139c5a516
New Zig formal grammar (#1685)
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
2018-11-13 05:08:37 -08:00

13 lines
337 B
Zig

// TODO Remove this workaround
comptime {
const builtin = @import("builtin");
if (builtin.os == builtin.Os.macosx) {
@export("__mh_execute_header", _mh_execute_header, builtin.GlobalLinkage.Weak);
}
}
var _mh_execute_header = extern struct {x: usize}{.x = 0};
export fn add(a: i32, b: i32) i32 {
return a + b;
}