summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2023-11-06 15:59:17 +0100
committerJo-Philipp Wich <jo@mein.io>2023-11-06 16:33:51 +0100
commit1468cc406bf9b46ae7942791eaa78f74a185062e (patch)
treedfdd03718e33e6a5b1a358b15191d0009f1d7ac3 /include
parentcfb24ea4f12131dcefe4f1ede2f51d3d16b88dec (diff)
syntax: don't treat `as` and `from` as reserved keywords
ECMAScript allows using `as` and `from` as identifiers so follow suit and don't treat them specially while parsing. Extend the compiler logic instead to check for TK_LABEL tokens with the expected value to properly parse import and export statements. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'include')
-rw-r--r--include/ucode/lexer.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/ucode/lexer.h b/include/ucode/lexer.h
index c013aac..1728aa3 100644
--- a/include/ucode/lexer.h
+++ b/include/ucode/lexer.h
@@ -119,8 +119,6 @@ typedef enum {
TK_TEMPLATE,
TK_IMPORT,
TK_EXPORT,
- TK_FROM,
- TK_AS,
TK_EOF,
TK_ERROR