From 3f31b09e7404e1ea374bbeb230bf34664b641efb Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 26 Sep 2018 14:00:05 -0700 Subject: Updated to the point of actually compiling. --- nomnom/pretty_errors.nom | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'nomnom/pretty_errors.nom') 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) -- cgit v1.2.3