From de3a062bfc206bf0373f96f4f6cc8c74ffcbab48 Mon Sep 17 00:00:00 2001 From: kartofen Date: Sun, 25 Aug 2024 17:33:40 +0300 Subject: lambda tested and if added --- src/lexer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lexer.c') 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, "(") \ -- cgit v1.2.3