4-variable-simplifier/expression/new.c
2026-04-25 16:00:10 -04:00

22 lines
350 B
C

#include <debug.h>
#include "struct.h"
#include "new.h"
struct expression* new_expression(
const struct expression_inheritance* inheritance,
int cost,
size_t size)
{
struct expression* this = smalloc(size);
this->inheritance = inheritance;
this->cost = cost;
this->refcount = 1;
return this;
}