implemented lambda

This commit is contained in:
Kyler Olsen 2025-11-30 20:54:48 -07:00
parent 15b3565ee9
commit 4ef109bcec
2 changed files with 7 additions and 2 deletions

View File

@ -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) {

View File

@ -65,6 +65,9 @@ void print_top_of_stack(InterpreterState *interpreter_state) {
case STACK_TOKEN_STRING:
printf("#0: <TOKEN STRING>\n");
break;
case STACK_CODE_BLOCK:
printf("#0: <CODE BLOCK>\n");
break;
}
}