hare

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

commit 36c8a0874ea5fcc71de9decfab16981172c34727
parent 52d70815e4105c68a4518d62436d1ff4d8f53894
Author: Alexey Yerin <yyp@disroot.org>
Date:   Sun, 24 Oct 2021 14:35:11 +0300

cmd/haredoc: don't try to search for unexported declarations

Signed-off-by: Alexey Yerin <yyp@disroot.org>

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

diff --git a/cmd/haredoc/main.ha b/cmd/haredoc/main.ha @@ -184,6 +184,10 @@ export fn main() void = { }; fn has_decl(decl: ast::decl, name: str) bool = { + if (!decl.exported) { + return false; + }; + match (decl.decl) { case d: []ast::decl_const => for (let i = 0z; i < len(d); i += 1) {