hare

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

commit 321d779f6d986e333743345d8c0ad45838fae226
parent ebe34ceb5213ec230f532b682d40926cdbc309ff
Author: Sebastian <sebastian@sebsite.pw>
Date:   Fri, 15 Apr 2022 18:48:49 -0400

ast: rename import_free to import_finish

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

Diffstat:
Mhare/ast/import.ha | 2+-
Mhare/ast/unit.ha | 2+-
Mhare/parse/+test/unit.ha | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hare/ast/import.ha b/hare/ast/import.ha @@ -23,7 +23,7 @@ export type import = struct { }; // Frees resources associated with an [[import]]. -export fn import_free(import: import) void = { +export fn import_finish(import: import) void = { ident_free(import.ident); if (import.mode == import_mode::ALIAS) { free(import.alias); diff --git a/hare/ast/unit.ha b/hare/ast/unit.ha @@ -11,7 +11,7 @@ export type subunit = struct { // Frees resources associated with a [[subunit]]. export fn subunit_free(u: subunit) void = { for (let i = 0z; i < len(u.imports); i += 1) { - import_free(u.imports[i]); + import_finish(u.imports[i]); }; free(u.imports); for (let i = 0z; i < len(u.decls); i += 1) { diff --git a/hare/parse/+test/unit.ha b/hare/parse/+test/unit.ha @@ -81,7 +81,7 @@ fn tup_to_import(tup: import_tuple) ast::import = ast::import { let lexer = lex::init(&buf, "<test>"); let mods = imports(&lexer)!; defer for (let i = 0z; i < len(mods); i += 1) { - ast::import_free(mods[i]); + ast::import_finish(mods[i]); }; let expected: [_]import_tuple = [