diff --git a/SLS_C/src/builtin.c b/SLS_C/src/builtin.c index 22231fc..24f1b1c 100644 --- a/SLS_C/src/builtin.c +++ b/SLS_C/src/builtin.c @@ -1608,8 +1608,10 @@ Boolean builtin_if(InterpreterState *interpreter_state) { } Boolean builtin_lambda(InterpreterState *interpreter_state) { - (void)interpreter_state; - return FALSE; + if (interpreter_state->stack == NULL) return FALSE; + if (interpreter_state->stack->type != STACK_TOKEN_STRING) return FALSE; + interpreter_state->stack->type = STACK_CODE_BLOCK; + return TRUE; } Boolean builtin_ln(InterpreterState *interpreter_state) { diff --git a/SLS_C/src/repl.c b/SLS_C/src/repl.c index 88be976..2d0ea96 100644 --- a/SLS_C/src/repl.c +++ b/SLS_C/src/repl.c @@ -65,6 +65,9 @@ void print_top_of_stack(InterpreterState *interpreter_state) { case STACK_TOKEN_STRING: printf("#0: \n"); break; + case STACK_CODE_BLOCK: + printf("#0: \n"); + break; } }