WIP: dev #1

Draft
nub31 wants to merge 103 commits from dev into master
2 changed files with 1 additions and 49 deletions
Showing only changes of commit ecb628c4c2 - Show all commits

View File

@@ -4,12 +4,8 @@ pushd core
dotnet run --project ../../compiler mem.nub print.nub --type=lib
popd
pushd math
dotnet run --project ../../compiler math.nub --type=lib
popd
pushd program
dotnet run --project ../../compiler main.nub ../math/.build/out.nublib ../core/.build/out.nublib
dotnet run --project ../../compiler main.nub ../core/.build/out.nublib
popd
./program/.build/out

View File

@@ -1,44 +0,0 @@
module math
export struct Human {
name: string
age: i32
}
export struct Pos {
x: i32
y: i32
}
export enum Message {
Quit: {}
Move: Pos
}
let x: i32
export func add(a: i32 b: i32): i32
{
let x = "test"
let msg: Message = enum Message::Move {
x = 10
y = 10
}
match msg {
Quit q {
// quit
}
Move m {
// move
}
}
return add_internal(a b)
}
func add_internal(a: i32 b: i32): i32
{
return a + b
}