mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-13 08:38:43 +03:00
ford: print source line on syntax error
This commit is contained in:
parent
c570def06a
commit
cb4cae01c8
@ -3165,10 +3165,12 @@
|
||||
?~ q.parsed
|
||||
=/ =path (rail-to-path source-rail)
|
||||
%- return-error
|
||||
:- :- %leaf
|
||||
%+ weld "ford: %hood: syntax error at "
|
||||
"[{<p.p.parsed>} {<q.p.parsed>}] in {<path>}"
|
||||
~
|
||||
=/ 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 [{<lyn>} {<col>}] in {<path>}"
|
||||
==
|
||||
::
|
||||
(return-result %success %hood p.u.q.parsed)
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user