add initial pages support

This commit is contained in:
2026-11-03 19:35:23 +03:00
parent f6efe2956e
commit 6f2367455a
6 changed files with 128 additions and 15 deletions

10
utils.sex Normal file
View File

@@ -0,0 +1,10 @@
(pub include stdlib.h)
(pub defmacro (mem-alloc type)
`(cast (malloc (sizeof ,type)) (* ,type)))
(pub defmacro (sum-type sum type)
(cat sum (cat 'ǂ type)))
(pub defmacro (tag-type sum-type)
`(enum ,(cat sum-type 'ǂ)))