diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-01-23 19:38:25 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-01-23 19:38:25 +0330 |
commit | 6f2a7cd1c662e30cd75b8cbcb246bdf9978c1290 (patch) | |
tree | 2deb26f95b59d9f364130bf3e9f423a747658fd1 /src/compiler/lexer.c | |
parent | 1963e7dddfaeebb22e3657adc1a7ee86fda50d52 (diff) |
check function arguments
Diffstat (limited to 'src/compiler/lexer.c')
-rw-r--r-- | src/compiler/lexer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/lexer.c b/src/compiler/lexer.c index 90eb36d..f248641 100644 --- a/src/compiler/lexer.c +++ b/src/compiler/lexer.c @@ -23,12 +23,13 @@ const char *LEXER_TOKEN_STRINGS[] = { "LEXER_TOKEN_SYMBOL_CLOSE_CURLY_BRACKET", "LEXER_TOKEN_SYMBOL_FUNCTION_ARROW", "LEXER_TOKEN_SYMBOL_COLON", + "LEXER_TOKEN_SYMBOL_COMMA", "LEXER_TOKEN_NONE", }; const char *LEXER_SYMBOL_STRINGS[] = { - ";", "(", ")", "{", "}", "->", ":", + ";", "(", ")", "{", "}", "->", ":", ",", }; const LexerToken LEXER_SYMBOL_TOKENS[] = { LEXER_TOKEN_SYMBOL_EOL, @@ -38,6 +39,7 @@ const LexerToken LEXER_SYMBOL_TOKENS[] = { LEXER_TOKEN_SYMBOL_CLOSE_CURLY_BRACKET, LEXER_TOKEN_SYMBOL_FUNCTION_ARROW, LEXER_TOKEN_SYMBOL_COLON, + LEXER_TOKEN_SYMBOL_COMMA, }; const size_t LEXER_SYMBOL_SIZE = sizeof(LEXER_SYMBOL_TOKENS) / sizeof(*LEXER_SYMBOL_TOKENS); @@ -178,6 +180,7 @@ void lexerPushClear(LexerNodeArray *array, size_t *array_size, char *iter, case LEXER_TOKEN_SYMBOL_CLOSE_CURLY_BRACKET: case LEXER_TOKEN_SYMBOL_FUNCTION_ARROW: case LEXER_TOKEN_SYMBOL_COLON: + case LEXER_TOKEN_SYMBOL_COMMA: if (*array_size == array->size) { *array_size += 1 + *array_size / 2; array->data = |