hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 7aea4128ab6216e5220429e316c8c9e6763656c0
parent 5681ef6618628de5a00fe5fd240f805097596f03
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sun,  1 May 2022 23:23:29 -0400

haredoc: free interior state of decls

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mcmd/haredoc/main.ha | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cmd/haredoc/main.ha b/cmd/haredoc/main.ha @@ -89,7 +89,7 @@ export fn main() void = { }; let decls: []ast::decl = []; - defer free(decls); // TODO: Free interior state + defer free(decls); let tags = default_tags(); defer module::tags_free(tags); @@ -173,6 +173,10 @@ export fn main() void = { show_undocumented = true; }; + defer for (let i = 0z; i < len(decls); i += 1) { + ast::decl_finish(decls[i]); + }; + const ctx = context { mctx = &ctx, ident = id,