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

30 lines
526 B
C

#include <debug.h>
/*#include <mpq/inc.h>*/
/*#include <parse/token/inc.h>*/
#include <string/inc.h>
#include "../new.h"
#include "inheritance.h"
#include "struct.h"
#include "new.h"
struct expression* new_variable_expression(
struct string *name)
{
ENTER;
struct variable_expression* this = (void*) new_expression(
/* inheritance: */ &variable_expression_inheritance,
/* alloc size: */ sizeof(*this));
this->name = inc_string(name);
EXIT;
return (void*) this;
}