From cb4cae01c80ef9261196792abf55308b6fc315c5 Mon Sep 17 00:00:00 2001 From: lukechampine Date: Wed, 8 Apr 2020 21:11:15 -0400 Subject: [PATCH] ford: print source line on syntax error --- pkg/arvo/sys/vane/ford.hoon | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/arvo/sys/vane/ford.hoon b/pkg/arvo/sys/vane/ford.hoon index 827a77b633..37ef5fdde3 100644 --- a/pkg/arvo/sys/vane/ford.hoon +++ b/pkg/arvo/sys/vane/ford.hoon @@ -3165,10 +3165,12 @@ ?~ q.parsed =/ =path (rail-to-path source-rail) %- return-error - :- :- %leaf - %+ weld "ford: %hood: syntax error at " - "[{} {}] in {}" - ~ + =/ lyn p.p.parsed + =/ col q.p.parsed + :~ leaf+(runt [(dec col) '-'] "^") + leaf+(trip (snag (dec lyn) (to-wain:format q.q.as-cage))) + leaf+"ford: %hood: syntax error at [{} {}] in {}" + == :: (return-result %success %hood p.u.q.parsed) ::