Implemented const keyword

This commit is contained in:
Eduard Urbach 2025-02-15 14:38:01 +01:00
parent 5f37a9e84a
commit 91a3ec9d52
Signed by: eduard
GPG key ID: 49226B848C78F6C8
21 changed files with 164 additions and 26 deletions

View file

@ -1,7 +1,17 @@
import sys
const prot {
read 0x1
write 0x2
}
const map {
private 0x02
anonymous 0x1000
}
alloc(length Int) -> []Int8 {
x := sys.mmap(0, length+8, 0x1|0x2, 0x02|0x1000)
x := sys.mmap(0, length+8, prot.read|prot.write, map.private|map.anonymous)
if x < 0x1000 {
return x