hare

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

commit 74db4821bfe9273882ed316cbe392615838ecce7
parent f1a8178e59a55fb2c9fcf3b57964a73e69f2d84d
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue, 20 Apr 2021 08:04:49 -0400

haredoc: add decl type to headings

Diffstat:
Mcmd/haredoc/html.ha | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/cmd/haredoc/html.ha b/cmd/haredoc/html.ha @@ -110,6 +110,12 @@ fn details(decl: ast::decl) (void | error) = { fmt::print("<h3 id='")?; unparse::ident(os::stdout, decl_ident(decl))?; fmt::print("'>")?; + fmt::printf("{} ", + match (decl.decl) { + _: ast::decl_func => "fn", + _: []ast::decl_type => "type", + _: []ast::decl_global => "let", + }); unparse::ident(os::stdout, decl_ident(decl))?; // TODO: Make this URL real fmt::print("<span class='heading-extra'>