29 lines
511 B
C
29 lines
511 B
C
|
|
#include <debug.h>
|
|
|
|
#include "../struct.h"
|
|
#include "../new.h"
|
|
|
|
#include "inheritance.h"
|
|
#include "struct.h"
|
|
#include "new.h"
|
|
|
|
struct value* new_boolean_value(
|
|
struct gc* gc,
|
|
bool literal)
|
|
{
|
|
ENTER;
|
|
|
|
struct value* super = new_value(
|
|
/* garbage collection: */ gc,
|
|
/* kind: */ vk_boolean,
|
|
/* inheritance: */ &boolean_value_inheritance);
|
|
|
|
struct boolean_value* this = &super->subclass.boolean;
|
|
|
|
this->value = literal;
|
|
|
|
EXIT;
|
|
return super;
|
|
}
|
|
|