From 0bd327ed3e8f78bb29db4bb8053703f3cc821ff3 Mon Sep 17 00:00:00 2001 From: mlokr Date: Sat, 1 Jun 2024 20:29:35 +0200 Subject: [PATCH] making modules work --- hblang/text-prj/main.hb | 5 +++++ hblang/text-prj/pkg.hb | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 hblang/text-prj/main.hb create mode 100644 hblang/text-prj/pkg.hb diff --git a/hblang/text-prj/main.hb b/hblang/text-prj/main.hb new file mode 100644 index 0000000..85e81a9 --- /dev/null +++ b/hblang/text-prj/main.hb @@ -0,0 +1,5 @@ +pkg := @use("pkg.hb"); + +main := fn(a: int): int { + return pkg.fib(10); +} diff --git a/hblang/text-prj/pkg.hb b/hblang/text-prj/pkg.hb new file mode 100644 index 0000000..931098b --- /dev/null +++ b/hblang/text-prj/pkg.hb @@ -0,0 +1,3 @@ +fib := fn(n: int): int { + return n + 1; +}