From 16aaaa19a3ef4220726007d3e644ced0c9e06513 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 9 Sep 2019 01:08:34 +0200 Subject: Allow referencing code in imported file (right now for function calls, allow calling a function in another file) --- tests/bytecode.amal | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'tests/bytecode.amal') 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(); +} -- cgit v1.2.3