aboutsummaryrefslogtreecommitdiff
path: root/src/tokens.h
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-02-04 00:01:39 -0500
committerMustafa Quraish <[email protected]>2022-02-04 01:00:00 -0500
commitec946600e660411955d0e03457a1c0fbe6f722c0 (patch)
tree0958210538d26006cdc322ad5dbea47c40bda69f /src/tokens.h
parentAdd some simple tests for arrays+strings (diff)
downloadcup-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.h1
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") \