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