Commit Graph

3 Commits

Author SHA1 Message Date
Ekaterina Vaartis
c48ebc7585 fix nested types producing wrong C code 2025-10-26 20:56:09 +03:00
e7122bdbd5 fix arrays of structs, multiple struct fields with same type 2025-10-22 16:59:15 +03:00
d11de327be move Sex to better types
Types, fns and vars are now written in another, better, more intuitive
and readable way.

Types:
"pointer to const char" is "* const char"
"array of pointers to volatile int" is "[* volatile int]"
Read left to right

Vars (as well as fn args, struct fields):
(var name type)
(struct vec3 ((x float) (y float) (z float))
(fn vec3-add ((v1 vec3) (v2 vec3)) vec3 ...)

Also fns are now have return types after arg list.

* is now must not be attached to any type name (or variable for that
matter)
2025-10-21 22:24:57 +03:00