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

26 lines
469 B
C

#include <debug.h>
#include "../new.h"
#include "inheritance.h"
#include "struct.h"
#include "new.h"
struct expression* new_literal_expression(
int cost, bool value)
{
ENTER;
struct literal_expression* this =
(void*) new_expression(
/* inheritance: */ &literal_expression_inheritance,
/* cost: */ cost,
/* size: */ sizeof(*this));
this->value = value;
EXIT;
return (void*) this;
}