aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/lexer.c')
-rw-r--r--src/compiler/lexer.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/compiler/lexer.c b/src/compiler/lexer.c
index a766ce7..f3a5d0e 100644
--- a/src/compiler/lexer.c
+++ b/src/compiler/lexer.c
@@ -110,6 +110,7 @@ const char *LEXER_TOKEN_STRINGS[] = {
"LEXER_TOKEN_SYMBOL_OPEN_PARENTHESIS",
"LEXER_TOKEN_SYMBOL_OPEN_BRACKET",
"LEXER_TOKEN_SYMBOL_OPEN_CURLY_BRACKET",
+ "LEXER_TOKEN_KEYWORD_LAZY",
"LEXER_TOKEN_NONE",
};
@@ -158,13 +159,14 @@ static const size_t LEXER_SYMBOL_SIZE =
sizeof(LEXER_SYMBOL_TOKENS) / sizeof(*LEXER_SYMBOL_TOKENS);
static const char *LEXER_KEYWORD_STRINGS[] = {
- "type", "void", "i8", "u8", "i16", "u16", "i32", "u32",
- "i64", "u64",
+ "type", "void", "i8", "u8", "i16", "u16",
+ "i32", "u32", "i64", "u64",
#ifdef FLOAT_16_SUPPORT
"f16",
#endif
- "f32", "f64", "f128", "bool", "putc", "return", "true", "false",
- "if", "else", "while", "comptime", "null", "struct", "undefined", "code",
+ "f32", "f64", "f128", "bool", "putc", "return",
+ "true", "false", "if", "else", "while", "comptime",
+ "null", "struct", "undefined", "code", "lazy",
};
static const LexerToken LEXER_KEYWORD_TOKENS[] = {
LEXER_TOKEN_KEYWORD_TYPE, LEXER_TOKEN_KEYWORD_VOID,
@@ -183,6 +185,7 @@ static const LexerToken LEXER_KEYWORD_TOKENS[] = {
LEXER_TOKEN_KEYWORD_WHILE, LEXER_TOKEN_KEYWORD_COMPTIME,
LEXER_TOKEN_KEYWORD_NULL, LEXER_TOKEN_KEYWORD_STRUCT,
LEXER_TOKEN_KEYWORD_UNDEFINED, LEXER_TOKEN_KEYWORD_CODE,
+ LEXER_TOKEN_KEYWORD_LAZY,
};
static const size_t LEXER_KEYWORD_SIZE =
sizeof(LEXER_KEYWORD_TOKENS) / sizeof(*LEXER_KEYWORD_TOKENS);
@@ -436,6 +439,7 @@ lexerPushClear(LexerNodeArray *array, size_t *array_size, char const *iter,
case LEXER_TOKEN_KEYWORD_STRUCT:
case LEXER_TOKEN_KEYWORD_UNDEFINED:
case LEXER_TOKEN_KEYWORD_CODE:
+ case LEXER_TOKEN_KEYWORD_LAZY:
case LEXER_TOKEN_NUMBER:
case LEXER_TOKEN_CHAR:
case LEXER_TOKEN_STRING: