diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-05-09 10:01:10 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-05-09 10:01:10 +0100 |
| commit | 64b5afd82096f3e9dfde125a8846d606db7c85fb (patch) | |
| tree | 3771f57ca8afc6420ce11a219f0cb31108b0eb81 /src/entity.c | |
| parent | 7692061eef48765ac51b8a8f3024491381fdf182 (diff) | |
Fix issue #63 for block comments not terminating at an EOF
Diffstat (limited to 'src/entity.c')
| -rw-r--r-- | src/entity.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/entity.c b/src/entity.c index 18b318a1f..465d75640 100644 --- a/src/entity.c +++ b/src/entity.c @@ -1,6 +1,7 @@ -typedef struct Scope Scope; -typedef struct Checker Checker; -typedef struct Type Type; +typedef struct Scope Scope; +typedef struct Checker Checker; +typedef struct Type Type; +typedef struct DeclInfo DeclInfo; // typedef enum BuiltinProcId BuiltinProcId; @@ -67,6 +68,7 @@ struct Entity { Scope * scope; Type * type; AstNode * identifier; // Can be NULL + DeclInfo * parent_proc_decl; // NULL if in file/global scope // TODO(bill): Cleanup how `using` works for entities Entity * using_parent; @@ -169,6 +171,7 @@ Entity *make_entity_using_variable(gbAllocator a, Entity *parent, Token token, T token.pos = parent->token.pos; Entity *entity = alloc_entity(a, Entity_Variable, parent->scope, token, type); entity->using_parent = parent; + entity->parent_proc_decl = parent->parent_proc_decl; entity->flags |= EntityFlag_Using; return entity; } |