aboutsummaryrefslogtreecommitdiffhomepage
path: root/c/c.h
Commit message (Collapse)AuthorAgeFilesLines
* create distinct interned string type lemon2025-12-151-2/+2
| | | | | | | | | | | | | | Interned strings are used pervasively, so it's a good idea to add a layer of type safety to differentiate them from general cstrs and avoid potential bugs from comparing non-interned and interned strings. Not that that's happened so far that I can remember, but it could. I'm 90% sure it's legal to alias `struct {char c;}` pointers with `char` pointers. This specific typedef gives type safety but with a simple one-way `internstr -> const char *` typecast (with `&istr->c`). Converting the other way around is more intentional: a straight up cast `(internstr)cstr` which sticks out as unchecked and probably wrong, or calling the intern(cstr) function, which is the right way.
* c: support for noreturn, and decl parsing cleanup lemon2025-12-111-0/+2
|
* c: add decl.sym; avoid calling mkhiddensym repeatedly lemon2025-11-221-0/+1
|
* factor type stuff into type.h lemon2025-11-161-0/+1
|
* preeliminary va_list support lemon2025-11-141-4/+34
|
* c irgen fixes lemon2025-10-191-1/+8
|
* Organize source files into directories lemon2025-10-191-0/+89