diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-09-09 01:08:34 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | 16aaaa19a3ef4220726007d3e644ced0c9e06513 (patch) | |
tree | 6a7c2fc91bc362559b079afbb10dc247d7bcbae0 /tests/bytecode.amal | |
parent | de48503aef098d855754ab6f85558402130188d7 (diff) |
Allow referencing code in imported file (right now for function calls, allow calling a function in another file)
Diffstat (limited to 'tests/bytecode.amal')
-rw-r--r-- | tests/bytecode.amal | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/bytecode.amal b/tests/bytecode.amal index ef255cd..6941bc8 100644 --- a/tests/bytecode.amal +++ b/tests/bytecode.amal @@ -1,8 +1,9 @@ -extern const print_extern: fn; -extern const print_extern_num: fn(num: i32); - -const print = fn { +/* +extern const print_extern: fn() i32; +extern const print_extern_num: fn(num: i32) i32; +const print = fn() i32 { + return 0; } const main = fn { @@ -21,4 +22,10 @@ const print_num = fn(num: i32) i32 { print_extern_num(num); print_extern_num(8080); return num; -}
\ No newline at end of file +} +*/ + +const io = @import("../std/io.amal"); +const main = fn { + io.print(); +} |