#include #include "../struct.h" #include "../new.h" #include "../kind.h" #include "struct.h" #include "inheritance.h" #include "new.h" struct value* new_user_lambda_value( struct gc* gc, struct value* environment, struct value* parameters, struct value* body) { ENTER; struct value* super = new_value( /* garbage collector/allocator: */ gc, /* kind: */ vk_user_lambda, /* inheritance: */ &user_lambda_value_inheritance); struct user_lambda_value* this = &super->subclass.user_lambda; this->environment = environment; this->parameters = parameters; this->body = body; this->is_macro = false; EXIT; return super; } struct value* new_user_lambda_value_given_macro( struct gc* gc, struct value* environment, struct value* parameters, struct value* body, bool is_macro) { ENTER; struct value* super = new_value( /* garbage collector/allocator: */ gc, /* kind: */ vk_user_lambda, /* inheritance: */ &user_lambda_value_inheritance); struct user_lambda_value* this = &super->subclass.user_lambda; this->environment = environment; this->parameters = parameters; this->body = body; this->is_macro = is_macro; EXIT; return super; }