| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
It's not really a keyword like the other ones, but just handled
completely at the lexer level since it already knows the location of the
token, so it injects a string literal instead.
We also use this in the self-hosted compiler now for better error
reporting for where the error happened internally.
|
| |
|
|
|
| |
(1) Add support for escaped single quotes
(2) Fix `putu_buffer` in `std/common.cup`
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Structs for now (and probably for the near future) are not allowed
to be passed by value, and instead you just pass a pointer to it.
Nested structs can also be defined, and they can be either anonymous,
or named (in which case only the members can access the type).
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit does a few things in one go:
- Add support for a `char` type + some changes to support the new size
- Add support for character literals. We need some escaping here to be
able to use `\n` and `\0`, etc.
- Add support for string literals. These are all stored in the `.data`
section. Fortunately NASM already handles the escape characters.
- Fix some bugs with code generation, specifically using `movsx` to sign
extend the smaller types into 64-bit registers.
|
| |
|
|
|
|
| |
Usual disclaimer at this point: Quick&Dirty implementation, hasn't
been tested other than basic sanity checks. Arrays are automatically
decayed into pointers when the identifier is accessed.
|
| |
|
|
|
|
| |
This still requires a lot of work to avoid duplicate imports, and
handle cyclic imports, but it is a good enough for small examples
which just want to include some common definitions from std/
|
| | |
|
| | |
|
| |
|