commit 90407118172676b71ea66f27029d5a87a877fbea
parent c9b97c71efe99f2ad4d332090a1dd2e579321bfc
Author: Lou Woell <lou.woell@posteo.de>
Date: Fri, 10 Oct 2025 03:52:31 +0200
[locate] formatting
Diffstat:
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/cmd/harehelper/locate.ha b/cmd/harehelper/locate.ha
@@ -68,6 +68,7 @@ fn locate_symbol (
let (path, src) = match :module (module::find(ctx, ns)) {
case let r: (str, module::srcset) =>
+ id = ident_last(id);
yield r;
case let e: module::error =>
match (module::unwrap_error(e)) {
@@ -82,9 +83,12 @@ fn locate_symbol (
};
defer module::finish_srcset(&src);
- id = ident_last(id);
-
- if (!module) for (let s .. src.ha) {
+ if (module) return lex::location {
+ path = strings::dup(path)!,
+ line = 0,
+ col = 0,
+ off = 0,
+ } else for (let s .. src.ha) {
let decls = match (scan(s)) {
case let e: error =>
@@ -130,10 +134,5 @@ fn locate_symbol (
};
};
- if (module) return lex::location {
- path = strings::dup(path)!,
- line = 0,
- col = 0,
- off = 0,
- } else return module::not_found;
+ return module::not_found;
};