summaryrefslogtreecommitdiffhomepage
path: root/lexer.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-05-18 11:12:01 +0200
committerJo-Philipp Wich <jo@mein.io>2021-05-18 13:11:33 +0200
commited32c42eefbc4560408d53445c603767469c85bd (patch)
tree15db63a3f8c7d74d9013699a067d5c984f820415 /lexer.c
parentff6811f29065951ab3917460f3d76ffe6ddb0c81 (diff)
compiler, lexer: add NO_LEGACY define to disable legacy syntax features
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lexer.c b/lexer.c
index 84af45d..cc35d66 100644
--- a/lexer.c
+++ b/lexer.c
@@ -145,7 +145,9 @@ static const struct keyword reserved_words[] = {
{ TK_RETURN, "return", 6, { 0 } },
{ TK_ENDFOR, "endfor", 6, { 0 } },
{ TK_SWITCH, "switch", 6, { 0 } },
+#ifndef NO_LEGACY
{ TK_LOCAL, "local", 5, { 0 } },
+#endif
{ TK_ENDIF, "endif", 5, { 0 } },
{ TK_WHILE, "while", 5, { 0 } },
{ TK_BREAK, "break", 5, { 0 } },