aboutsummaryrefslogtreecommitdiff
path: root/src/tokens.h
diff options
context:
space:
mode:
authorMustafa Quraish <[email protected]>2022-02-02 19:22:15 -0500
committerMustafa Quraish <[email protected]>2022-02-02 19:22:15 -0500
commite2dbc82213a6e5da74de2220eeeab78da41fb519 (patch)
tree7f6d9a40fde00ec761e100a92bd93f555725d56c /src/tokens.h
parentMove type-related stuff to a separate file (diff)
downloadcup-e2dbc82213a6e5da74de2220eeeab78da41fb519.tar.xz
cup-e2dbc82213a6e5da74de2220eeeab78da41fb519.zip
Add initial support for arrays (also no testing)
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.
Diffstat (limited to 'src/tokens.h')
-rw-r--r--src/tokens.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tokens.h b/src/tokens.h
index 42f4647..f076b89 100644
--- a/src/tokens.h
+++ b/src/tokens.h
@@ -9,6 +9,7 @@
F(TOKEN_ASSIGN, "=") \
F(TOKEN_BAR, "|") \
F(TOKEN_CLOSE_BRACE, "}") \
+ F(TOKEN_CLOSE_BRACKET, "]") \
F(TOKEN_CLOSE_PAREN, ")") \
F(TOKEN_COLON, ":") \
F(TOKEN_COMMA, ",") \
@@ -27,6 +28,7 @@
F(TOKEN_MINUSMINUS, "--") \
F(TOKEN_NEQ, "!=") \
F(TOKEN_OPEN_BRACE, "{") \
+ F(TOKEN_OPEN_BRACKET, "[") \
F(TOKEN_OPEN_PAREN, "(") \
F(TOKEN_OR, "||") \
F(TOKEN_PERCENT, "%") \