diff options
-rw-r--r-- | include/ucode/lexer.h | 4 | ||||
-rw-r--r-- | lexer.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/ucode/lexer.h b/include/ucode/lexer.h index dbec129..e3aba8e 100644 --- a/include/ucode/lexer.h +++ b/include/ucode/lexer.h @@ -117,6 +117,10 @@ typedef enum { TK_NULLISH, TK_PLACEH, TK_TEMPLATE, + TK_IMPORT, + TK_EXPORT, + TK_FROM, + TK_AS, TK_EOF, TK_ERROR @@ -54,6 +54,8 @@ static const struct keyword reserved_words[] = { { TK_RETURN, "return", 6 }, { TK_ENDFOR, "endfor", 6 }, { TK_SWITCH, "switch", 6 }, + { TK_IMPORT, "import", 6 }, + { TK_EXPORT, "export", 6 }, { TK_ENDIF, "endif", 5 }, { TK_WHILE, "while", 5 }, { TK_BREAK, "break", 5 }, @@ -66,11 +68,13 @@ static const struct keyword reserved_words[] = { { TK_THIS, "this", 4 }, { TK_NULL, "null", 4 }, { TK_CASE, "case", 4 }, + { TK_FROM, "from", 4 }, { TK_TRY, "try", 3 }, { TK_FOR, "for", 3 }, { TK_LOCAL, "let", 3 }, { TK_IF, "if", 2 }, { TK_IN, "in", 2 }, + { TK_AS, "as", 2 }, }; |