add a standard library, and introduce formed imports (import std "myfile.pork")

This commit is contained in:
2023-09-06 21:39:57 -07:00
parent f31e12df89
commit 0e4362eefb
18 changed files with 153 additions and 32 deletions

View File

@ -0,0 +1,5 @@
export func malloc(size)
native ffi "c:malloc:void*"
export func free(pointer)
native ffi "c:free:void"

View File

@ -0,0 +1,15 @@
export func add(a, b) {
a + b
}
export func subtract(a, b) {
a - b
}
export func multiply(a, b) {
a * b
}
export func divide(a, b) {
a / b
}

View File

@ -0,0 +1 @@
numbers.pork