mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-19 04:12:22 -07:00
print_(f32|f64)
This commit is contained in:
+8
-16
@@ -7,7 +7,6 @@ enum BuiltinProcId;
|
||||
ENTITY_KIND(Constant), \
|
||||
ENTITY_KIND(Variable), \
|
||||
ENTITY_KIND(TypeName), \
|
||||
ENTITY_KIND(AliasName), \
|
||||
ENTITY_KIND(Procedure), \
|
||||
ENTITY_KIND(Builtin), \
|
||||
ENTITY_KIND(Count),
|
||||
@@ -38,16 +37,14 @@ struct Entity {
|
||||
isize order;
|
||||
|
||||
union {
|
||||
struct { ExactValue value; } constant;
|
||||
struct { ExactValue value; } Constant;
|
||||
struct {
|
||||
b8 visited;
|
||||
b8 is_field;
|
||||
b8 used;
|
||||
} variable;
|
||||
struct {} type_name;
|
||||
struct {} alias_name;
|
||||
struct {} procedure;
|
||||
struct { BuiltinProcId id; } builtin;
|
||||
} Variable;
|
||||
struct { b8 used; } Procedure;
|
||||
struct { BuiltinProcId id; } Builtin;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -74,7 +71,7 @@ Entity *make_entity_variable(gbAllocator a, Scope *parent, Token token, Type *ty
|
||||
|
||||
Entity *make_entity_constant(gbAllocator a, Scope *parent, Token token, Type *type, ExactValue value) {
|
||||
Entity *entity = alloc_entity(a, Entity_Constant, parent, token, type);
|
||||
entity->constant.value = value;
|
||||
entity->Constant.value = value;
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -83,20 +80,15 @@ Entity *make_entity_type_name(gbAllocator a, Scope *parent, Token token, Type *t
|
||||
return entity;
|
||||
}
|
||||
|
||||
Entity *make_entity_alias_name(gbAllocator a, Scope *parent, Token token, Type *type) {
|
||||
Entity *entity = alloc_entity(a, Entity_AliasName, parent, token, type);
|
||||
return entity;
|
||||
}
|
||||
|
||||
Entity *make_entity_param(gbAllocator a, Scope *parent, Token token, Type *type) {
|
||||
Entity *entity = make_entity_variable(a, parent, token, type);
|
||||
entity->variable.used = true;
|
||||
entity->Variable.used = true;
|
||||
return entity;
|
||||
}
|
||||
|
||||
Entity *make_entity_field(gbAllocator a, Scope *parent, Token token, Type *type) {
|
||||
Entity *entity = make_entity_variable(a, parent, token, type);
|
||||
entity->variable.is_field = true;
|
||||
entity->Variable.is_field = true;
|
||||
return entity;
|
||||
}
|
||||
|
||||
@@ -107,7 +99,7 @@ Entity *make_entity_procedure(gbAllocator a, Scope *parent, Token token, Type *s
|
||||
|
||||
Entity *make_entity_builtin(gbAllocator a, Scope *parent, Token token, Type *type, BuiltinProcId id) {
|
||||
Entity *entity = alloc_entity(a, Entity_Builtin, parent, token, type);
|
||||
entity->builtin.id = id;
|
||||
entity->Builtin.id = id;
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user