aboutsummaryrefslogtreecommitdiff
path: root/src/tokens.h
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-02-01 04:08:59 -0500
committerMustafa Quraish <[email protected]>2022-02-01 04:08:59 -0500
commitd471a41369690a9d2d9b8862ea5ff0ae9cbe40fc (patch)
tree9399d12700c3d975a95b0946833dc419b3268419 /src/tokens.h
parentTesting: Add support for testing stdout results, check builtins (diff)
downloadcup-d471a41369690a9d2d9b8862ea5ff0ae9cbe40fc.tar.xz
cup-d471a41369690a9d2d9b8862ea5ff0ae9cbe40fc.zip
Add basic `defer` implementation.
We don't have any closures yet, so it's essentially the same as just moving the statement after the `defer` keyword to the end of the block/ right before returning from the function.
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 7af4780..42f4647 100644
--- a/src/tokens.h
+++ b/src/tokens.h
@@ -44,6 +44,7 @@
#define ENUM_KEYWORDS(F) \
F(TOKEN_ELSE, "else") \
+ F(TOKEN_DEFER, "defer") \
F(TOKEN_FN, "fn") \
F(TOKEN_FOR, "for") \
F(TOKEN_IF, "if") \