lambda-calc-1/expression/lambda/new.c
2025-01-13 20:36:07 -06:00

34 lines
640 B
C

#include <debug.h>
/*#include <mpq/inc.h>*/
/*#include <parse/token/inc.h>*/
#include <string/inc.h>
#include "../new.h"
#include "../inc.h"
#include "inheritance.h"
#include "struct.h"
#include "new.h"
struct expression* new_lambda_expression(
struct string *variable_name,
struct expression* body)
{
ENTER;
struct lambda_expression* this = (void*) new_expression(
/* inheritance: */ &lambda_expression_inheritance,
/* alloc size: */ sizeof(*this));
this->variable_name = inc_string(variable_name);
this->body = inc_expression(body);
EXIT;
return (void*) this;
}