Improved type system

This commit is contained in:
Eduard Urbach 2025-02-09 23:52:07 +01:00
parent c0ffddaba8
commit 2e3857622a
Signed by: eduard
GPG key ID: 49226B848C78F6C8
30 changed files with 132 additions and 85 deletions

View file

@ -6,10 +6,10 @@ number(x Int) {
buffer := mem.alloc(length)
address, count := itoa(x, buffer, length)
sys.write(1, address, count)
mem.free(buffer, length)
mem.free(buffer)
}
itoa(x Int, buffer Pointer, length Int) -> (Pointer, Int) {
itoa(x Int, buffer *Any, length Int) -> (*Any, Int) {
end := buffer + length
tmp := end
digit := 0