22 lines
350 B
C
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;
|
|
}
|
|
|