diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-09-21 13:59:39 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | c811a743a1528db1d05970e1aa14162ef7c70b75 (patch) | |
tree | 4560ab5d9084c385946415e9fc2dbf187e26c844 /tests/bytecode.amal | |
parent | 142a13ad3f77c0ad1bd321d1a1f864a5117896d1 (diff) |
Implement vararg, verify arguments to parameters
Diffstat (limited to 'tests/bytecode.amal')
-rw-r--r-- | tests/bytecode.amal | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/tests/bytecode.amal b/tests/bytecode.amal index 6941bc8..d27a240 100644 --- a/tests/bytecode.amal +++ b/tests/bytecode.amal @@ -1,31 +1,5 @@ -/* -extern const print_extern: fn() i32; -extern const print_extern_num: fn(num: i32) i32; +extern const printf: fn(fmt: ?*c_char, ...) c_int; -const print = fn() i32 { - return 0; -} - -const main = fn { - var value = 23; - value = 34; - const value2: i64 = 54; - const value3 = 2 + 5 - 1 * 10 / 2; - const str_value = "hello, world"; - print(); - if value2 == 54 - const result = print_num(1337); -} - -const print_num = fn(num: i32) i32 { - print_extern(); - print_extern_num(num); - print_extern_num(8080); - return num; -} -*/ - -const io = @import("../std/io.amal"); const main = fn { - io.print(); + printf("hello, world!\n"); } |