26 lines
469 B
C
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;
|
|
}
|
|
|