From b9de362ba24988cbf428fe62e34717051b3b1c34 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 00000000..85e81a94 --- /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 00000000..931098ba --- /dev/null +++ b/hblang/text-prj/pkg.hb @@ -0,0 +1,3 @@ +fib := fn(n: int): int { + return n + 1; +}