diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-09-26 14:00:05 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-09-26 14:00:05 -0700 |
| commit | 3f31b09e7404e1ea374bbeb230bf34664b641efb (patch) | |
| tree | b619f129e263de2e2a8a5a4866188fcb779031e6 /nomnom/pretty_errors.nom | |
| parent | 17dfd248640caae5eecc13be8974378c39953f39 (diff) | |
Updated to the point of actually compiling.
Diffstat (limited to 'nomnom/pretty_errors.nom')
| -rw-r--r-- | nomnom/pretty_errors.nom | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nomnom/pretty_errors.nom b/nomnom/pretty_errors.nom index 732f3b9..ffc6fd1 100644 --- a/nomnom/pretty_errors.nom +++ b/nomnom/pretty_errors.nom @@ -8,8 +8,9 @@ local action [boxed %text]: %max_line = (..) max of ((visible size of %line) for %line in (%text::lines)) %ret = (..) - "\n\%text"::with "\n([^\n]*)" as % -> (..) - "\n\%\(" "::* (%max_line - (visible size of %))) \027[0m" + "\n\%text"::with "\n([^\n]*)" -> (..) + [%] -> (..) + "\n\%\(" "::* (%max_line - (visible size of %))) \027[0m" return %ret.[2,-1] action [%err as a pretty error]: @@ -66,7 +67,7 @@ action [%err as a pretty error]: ..\027[47;31;1m\((" \(%err.error)"::wrapped to %box_width)::with "\n" -> "\n\027[47;31;1m ")" if %err.hint: err_text += "\n\027[47;30m\((" Suggestion: \(%err.hint)"::wrapped to %box_width)::with "\n" -> "\n\027[47;30m ")" - %err_msg += "\n\027[33;1m \((%err_text boxed) with "\n" -> "\n ")" + %err_msg += "\n\027[33;1m \((%err_text boxed)::with "\n" -> "\n ")" for %i in (%err_linenum_end + 1) to (%err_linenum_end + %context): %line = (%err_code::line %i) |
