diff options
| author | Mustafa Quraish <[email protected]> | 2022-02-04 00:01:39 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-02-04 01:00:00 -0500 |
| commit | ec946600e660411955d0e03457a1c0fbe6f722c0 (patch) | |
| tree | 0958210538d26006cdc322ad5dbea47c40bda69f /src/tokens.h | |
| parent | Add some simple tests for arrays+strings (diff) | |
| download | cup-ec946600e660411955d0e03457a1c0fbe6f722c0.tar.xz cup-ec946600e660411955d0e03457a1c0fbe6f722c0.zip | |
Add support for read-only constant expressions
We can now have constant definitions that are read-only, evaluated
at compile time and just behave like integer literals when accessed.
These are nice because we can now potentially inject syscall numbers/
etc through the compiler.
Diffstat (limited to 'src/tokens.h')
| -rw-r--r-- | src/tokens.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tokens.h b/src/tokens.h index 455d269..05f2162 100644 --- a/src/tokens.h +++ b/src/tokens.h @@ -48,6 +48,7 @@ #define ENUM_KEYWORDS(F) \ F(TOKEN_CHAR, "char") \ + F(TOKEN_CONST, "const") \ F(TOKEN_ELSE, "else") \ F(TOKEN_DEFER, "defer") \ F(TOKEN_FN, "fn") \ |