Use the new ANSI module.

This commit is contained in:
Dominik Pantůček 2023-03-14 11:48:55 +01:00
parent f90041a0ff
commit 36e6e3c3cf
2 changed files with 7 additions and 3 deletions

View file

@ -41,9 +41,9 @@
(dictionary-tests!)
(month-tests!)
(period-tests!)
(ansi-tests!)
(member-file-tests!)
(command-line-tests!)
(ansi-tests!)
(newline)
(command-line

View file

@ -40,7 +40,8 @@
month
period
testing
listing)
listing
ansi)
;; Specification of known keys for various types of parsing
(define known-keys '(nick mail phone name born joined destroyed
@ -79,7 +80,10 @@
(define (report-line-error file-name lines highlights message)
(print "Error in " file-name ": " message)
(newline)
(print-source-listing lines highlights (*member-file-context*) "\x1b[31;1m" "\x1b[0m" "" "" "...")
(print-source-listing lines highlights
(*member-file-context*)
(ansi #:red #:bold) (ansi #:default)
"" "" "...")
(exit 1))
;; Parses given key-value line. Key is up to first space, value is the