aboutsummaryrefslogtreecommitdiff
path: root/pretty_errors.moon
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-09-14 14:00:48 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-09-14 14:01:07 -0700
commit7c1f2dfd69afe119322e19b3a4061876b3dd1033 (patch)
treeee540007cdad2681b03a208c657811591da58cc9 /pretty_errors.moon
parent4d48bf359df98512a2a741d48ea222d055b733c0 (diff)
Fixes and improvements, and ported nomsu.3.peg to new tidier syntax.
Diffstat (limited to 'pretty_errors.moon')
-rw-r--r--pretty_errors.moon1
1 files changed, 1 insertions, 0 deletions
diff --git a/pretty_errors.moon b/pretty_errors.moon
index 3b583b7..b0d81f9 100644
--- a/pretty_errors.moon
+++ b/pretty_errors.moon
@@ -34,6 +34,7 @@ format_error = (err)->
err_line = "\027[0m#{before}\027[41;30m#{during}#{nl_indicator}\027[0m#{after}"
err_msg ..= "\n\027[2m#{fmt_str\format(err_linenum)}#{err_line}\027[0m"
_, err_linenum_end, err_linepos_end = string2.line_at(err.source, err.stop)
+ err_linenum_end or= err_linenum
if err_linenum_end == err_linenum
err_msg ..= "\n#{pointer}"
else