commit 6fe66521a117c2dc1d8979c1f8b8dd917ea97990
parent 249f80521075f94faae06bfbbe6fbcb92fb02061
Author: Sebastian <sebastian@sebsite.pw>
Date: Sun, 17 Apr 2022 19:58:24 -0400
hare::ast: rename decl_free to decl_finish
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmd/haredoc/main.ha b/cmd/haredoc/main.ha
@@ -161,7 +161,7 @@ export fn main() void = {
if (has_decl(decls[i], decl)) {
append(new, decls[i]);
} else {
- ast::decl_free(decls[i]);
+ ast::decl_finish(decls[i]);
};
};
if (len(new) == 0) {
diff --git a/cmd/haredoc/resolver.ha b/cmd/haredoc/resolver.ha
@@ -135,7 +135,7 @@ fn lookup_remote_enum(ctx: *context, what: ast::ident) (ast::ident | void) = {
let decls: []ast::decl = [];
defer {
for (let i = 0z; i < len(decls); i += 1) {
- ast::decl_free(decls[i]);
+ ast::decl_finish(decls[i]);
};
free(decls);
};
diff --git a/hare/ast/decl.ha b/hare/ast/decl.ha
@@ -63,7 +63,7 @@ export type decl = struct {
};
// Frees resources associated with a declaration.
-export fn decl_free(d: decl) void = {
+export fn decl_finish(d: decl) void = {
free(d.docs);
match (d.decl) {
case let g: []decl_global =>
diff --git a/hare/ast/unit.ha b/hare/ast/unit.ha
@@ -15,7 +15,7 @@ export fn subunit_finish(u: subunit) void = {
};
free(u.imports);
for (let i = 0z; i < len(u.decls); i += 1) {
- decl_free(u.decls[i]);
+ decl_finish(u.decls[i]);
};
free(u.decls);
};