...
This commit is contained in:
@@ -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
6
examples/core/print.nub
Normal file
@@ -0,0 +1,6 @@
|
||||
module print
|
||||
|
||||
extern func puts(^u8 text)
|
||||
|
||||
export func print(text: string) {
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user