aboutsummaryrefslogtreecommitdiff
path: root/compiler/tokens.cup
Commit message (Collapse)AuthorAgeFilesLines
* [C]: Add `here` keyword that evaluates to a string with it's locationMustafa Quraish2022-02-061-3/+5
| | | | | | | | | 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.
* [cup] Flesh out some more boilerplate based on C implementationMustafa Quraish2022-02-061-0/+3
| | | | | | No feature has really been fully added here, just fleshing out some more of the global variables / functions / conditions here so it's easier to implement them later on
* Add implementation of self-hosted compiler so farMustafa Quraish2022-02-051-0/+238
There's also a `run.sh2` script which does the following: - Compiles the C compiler `build/cupcc` - Compiles the self-hosted compiler `build/cup.out` (with `cupcc`) - Compiles the specified file on CLI with `build/cup.out` - Runs this exectuable and shows the output