This commit is contained in:
nub31
2026-02-27 21:29:28 +01:00
parent 272ea33616
commit e512650440
4 changed files with 57 additions and 21 deletions

View File

@@ -1,12 +1,13 @@
set -e
pushd core
dotnet run --project ../../compiler print.nub --type=lib
popd
pushd math
dotnet run --project ../../compiler math.nub --type=lib
# pushd .build
# unzip out.nublib
# popd
popd
pushd program
dotnet run --project ../../compiler main.nub ../math/.build/out.nublib
dotnet run --project ../../compiler main.nub ../math/.build/out.nublib ../core/.build/out.nublib
popd

6
examples/core/print.nub Normal file
View File

@@ -0,0 +1,6 @@
module print
extern func puts(^u8 text)
export func print(text: string) {
}

View File

@@ -1,6 +1,17 @@
module main
struct Pos {
x: i32
y: i32
}
func main(): i32
{
return math::add(1 2)
test({ x = 23 y = 23 })
return 1
}
func test(x: Pos): void
{
}