hare

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

commit 95cabeb6ffa39967142b50195d9dd5cbe5900a73
parent 23ce5a34ba2bc2b5a587617d723c8f50b3634ade
Author: Sebastian <sebastian@sebsite.pw>
Date:   Tue, 18 Jul 2023 18:59:19 -0400

hare::unparse: add newline between imports and decls

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

Diffstat:
Mhare/unparse/unit.ha | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/hare/unparse/unit.ha b/hare/unparse/unit.ha @@ -12,6 +12,9 @@ export fn subunit(out: io::handle, s: ast::subunit) (size | io::error) = { n += import(out, s.imports[i])?; n += fmt::fprintln(out)?; }; + if (len(s.imports) > 0) { + n += fmt::fprintln(out)?; + }; for (let i = 0z; i < len(s.decls); i += 1) { n += decl(out, s.decls[i])?; if (i < len(s.decls) - 1) n += fmt::fprintln(out)?;