Merge pull request #6338 from urbit/i/6287/eof-syntax-error

clay: render syntax errors at end of file
This commit is contained in:
Ted Blackman 2023-02-17 09:12:58 -05:00 committed by GitHub
commit 8afe2d1ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -964,8 +964,14 @@
%- mean %- flop
=/ lyn p.hair
=/ col q.hair
^- (list tank)
:~ leaf+"syntax error at [{<lyn>} {<col>}] in {<pax>}"
leaf+(trip (snag (dec lyn) (to-wain:format (crip tex))))
::
=/ =wain (to-wain:format (crip tex))
?: (gth lyn (lent wain))
'<<end of file>>'
(snag (dec lyn) wain)
::
leaf+(runt [(dec col) '-'] "^")
==
::