53 lines
894 B
C
53 lines
894 B
C
|
|
#include <debug.h>
|
|
|
|
#include <string/inc.h>
|
|
|
|
#include "../new.h"
|
|
#include "../inc.h"
|
|
|
|
#include "inheritance.h"
|
|
#include "struct.h"
|
|
#include "new.h"
|
|
|
|
struct value* new_builtin_lambda_value(
|
|
struct string* name,
|
|
struct value* (*funcptr)(
|
|
struct booleans*,
|
|
struct builtin_lambda_value* prev,
|
|
struct value* tail),
|
|
size_t number_of_parameters,
|
|
struct value* value,
|
|
struct builtin_lambda_value* prev)
|
|
{
|
|
ENTER;
|
|
|
|
struct builtin_lambda_value* this = (void*) new_value(
|
|
vk_builtin_lambda,
|
|
&builtin_lambda_value_inheritance,
|
|
sizeof(*this));
|
|
|
|
this->name = inc_string(name);
|
|
|
|
this->funcptr = funcptr;
|
|
|
|
this->number_of_parameters = number_of_parameters;
|
|
|
|
this->value = inc_value(value);
|
|
|
|
this->prev = (void*) inc_value((void*) prev);
|
|
|
|
EXIT;
|
|
return (void*) this;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|