32 lines
596 B
C
32 lines
596 B
C
|
|
#include <debug.h>
|
|
|
|
#include <string/inc.h>
|
|
|
|
#include "../struct.h"
|
|
#include "../new.h"
|
|
#include "../kind.h"
|
|
|
|
#include "struct.h"
|
|
#include "inheritance.h"
|
|
#include "new.h"
|
|
|
|
struct value* new_identifier_value(
|
|
struct gc* gc,
|
|
struct string* name)
|
|
{
|
|
ENTER;
|
|
|
|
struct value* super = new_value(
|
|
/* garbage collector/allocator: */ gc,
|
|
/* kind: */ vk_identifier,
|
|
/* inheritance: */ &identifier_value_inheritance);
|
|
|
|
struct identifier_value* this = &super->subclass.identifier;
|
|
|
|
this->name = inc_string(name);
|
|
|
|
EXIT;
|
|
return super;
|
|
}
|
|
|