Dynamic array syntax [...]Type; make entities private with a prefix of _; fix extension checking

This commit is contained in:
Ginger Bill
2017-02-11 17:33:23 +00:00
parent 346aa5f71c
commit 4306345ff1
14 changed files with 173 additions and 89 deletions
+9
View File
@@ -98,6 +98,15 @@ struct Entity {
gb_global Entity *e_context = NULL;
bool is_entity_name_exported(Entity *e) {
GB_ASSERT(e != NULL);
String name = e->token.string;
if (name.len == 0) {
return false;
}
return name.text[0] != '_';
}
Entity *alloc_entity(gbAllocator a, EntityKind kind, Scope *scope, Token token, Type *type) {
Entity *entity = gb_alloc_item(a, Entity);