diff options
author | kartofen <mladenovnasko0@gmail.com> | 2024-08-25 17:33:40 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2024-08-25 17:33:40 +0300 |
commit | de3a062bfc206bf0373f96f4f6cc8c74ffcbab48 (patch) | |
tree | facb0d94172157107a7cb73c82b44bf67d0da1ac /src/lexer.c | |
parent | c740ece288c3fb6f858a911222fd63caf95c4eea (diff) |
lambda tested and if added
Diffstat (limited to 'src/lexer.c')
-rw-r--r-- | src/lexer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lexer.c b/src/lexer.c index 77407a9..b546fda 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -7,6 +7,7 @@ #define CH(lexer) (lexer)->str[(lexer)->str_idx] #define TOKEN_SEPARATOR_TABLE(X, l) \ + X((';' == CH(l)), CH(l) = '\0') \ X(('(' == CH(l)), on_separator(l, TOKEN_LP)) \ X((')' == CH(l)), on_separator(l, TOKEN_RP)) \ X(('\''== CH(l)), on_separator(l, TOKEN_QUOTE)) \ @@ -29,7 +30,8 @@ X(TOKEN_DOT, ".") \ X(TOKEN_LAMBDA, "lambda") \ X(TOKEN_DEFINE, "define") \ - X(TOKEN_QUOTE_FORM, "quote") + X(TOKEN_QUOTE_FORM, "quote") \ + X(TOKEN_IF, "if") #define TOKEN_VALUE_STRING_TABLE(X, tvalue) \ X(TOKEN_LP, "(") \ |