aboutsummaryrefslogtreecommitdiffhomepage
path: root/type.c
Commit message (Collapse)AuthorAgeFilesLines
* REFACTOR: move sources to src/lemon2026-03-171-311/+0
|
* create distinct interned string typelemon2025-12-151-5/+5
| | | | | | | | | | | | | | 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 forward-declared enumslemon2025-12-151-11/+15
| | | | This is a common non-standard GNU extension.
* c: allow implicit type conversions between plain char pointer andlemon2025-12-141-3/+5
| | | | signed/unsigned char pointer
* rename arraylength macro -> countoflemon2025-12-111-3/+3
|
* c: accept C99 `[static N]` style array decls, changes to fn qualslemon2025-12-111-9/+3
| | | | | | Function parameters qualifiers don't matter outside of function definition. `int (const int)` should be compatible with `int(int)` etc. So no need to store them in the typedata.
* c: support for noreturn, and decl parsing cleanuplemon2025-12-111-1/+0
|
* c/type: make implicit const T* -> T* conversion warning, not errorlemon2025-11-261-2/+1
|
* factor type stuff into type.hlemon2025-11-161-1/+1
|
* - break;lemon2025-10-241-1/+0
|
* implement long double (as double synonym). wchar_t placeholderlemon2025-10-151-1/+0
|
* arithmetic type cvt erratalemon2025-10-131-2/+2
|
* add initializers (only static for initialier list rn)lemon2023-06-291-1/+1
| | | | and other fixes
* support calling undeclared functionslemon2023-06-041-0/+4
|
* abi lowering passlemon2023-06-041-6/+0
|
* field accesslemon2023-05-291-6/+34
|
* improve struct tokenlemon2023-05-281-3/+3
|
* hmlemon2023-05-261-2/+4
|
* initial commitlemon2023-05-101-0/+287