Improved type system

This commit is contained in:
2025-02-09 23:52:07 +01:00
parent 7634244c56
commit f19d9063a5
30 changed files with 132 additions and 85 deletions

@ -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