aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index d0227e8..8c4bfec 100644
--- a/src/main.c
+++ b/src/main.c
@@ -811,7 +811,7 @@ static int toklist_expr(struct tctx *tctx, struct toklist **toklist)
if(TOKEN(tctx)->type == TOKEN_LP) depth++;
else if(TOKEN(tctx)->type == TOKEN_RP) depth--;
-
+
if(toklist)
token_clone(&tokens[tokens_len++], TOKEN(tctx));
@@ -823,7 +823,7 @@ static int toklist_expr(struct tctx *tctx, struct toklist **toklist)
}
return 0;
-
+
// fail:
// for(size_t i = 0; i < tokens_len; i++) token_dealloc(&tokens[i]);
// return 1;
@@ -838,6 +838,12 @@ static struct toklist *value_to_toklist(value_t value)
switch(value->type) {
case VALUE_ATOM:
+ // fix me
+ if(strcmp(value->value.atom, "lambda") == 0) {
+ SET_TOKEN_TYPE(&token, TOKEN_LAMBDA);
+ break;
+ }
+
SET_TOKEN_TYPE(&token, TOKEN_ID);
SET_TOKEN_VALUE(&token, id,
str_alloc_copy(value->value.atom));