Remove old util-kwargs, replace with Racket-compatible define*/lambda* forms.
This commit is contained in:
parent
d24526b765
commit
963d3069e9
6 changed files with 399 additions and 52 deletions
|
@ -39,7 +39,7 @@
|
|||
(chicken format)
|
||||
testing
|
||||
ansi
|
||||
util-kwargs
|
||||
racket-kwargs
|
||||
util-dict-list
|
||||
table)
|
||||
|
||||
|
@ -127,21 +127,21 @@
|
|||
|
||||
;; Prints and highlights a selection of source listing lines and
|
||||
;; their optional context.
|
||||
(define-kwproc (print-source-listing
|
||||
lines
|
||||
highlights
|
||||
(#:highlight-rules highlight-rules
|
||||
`((error ,(ansi #:bold #:red) ,(ansi #:default))
|
||||
(warning ,(ansi #:yellow) ,(ansi #:default))
|
||||
(info ,(ansi #:cyan) ,(ansi #:default))
|
||||
))
|
||||
(#:ellipsis ellipsis "...")
|
||||
(#:context-pre ctx-pre "")
|
||||
(#:context-post ctx-post "")
|
||||
(#:highlight-pre hl-pre a:error)
|
||||
(#:highlight-post hl-post a:default)
|
||||
(#:context context 3)
|
||||
(#:keys keys '(number line comment)))
|
||||
(define* (print-source-listing
|
||||
lines
|
||||
highlights
|
||||
#:highlight-rules (highlight-rules
|
||||
`((error ,(ansi #:bold #:red) ,(ansi #:default))
|
||||
(warning ,(ansi #:yellow) ,(ansi #:default))
|
||||
(info ,(ansi #:cyan) ,(ansi #:default))
|
||||
))
|
||||
#:ellipsis (ellipsis "...")
|
||||
#:context-pre (ctx-pre "")
|
||||
#:context-post (ctx-post "")
|
||||
#:highlight-pre (hl-pre a:error)
|
||||
#:highlight-post (hl-post a:default)
|
||||
#:context (context 3)
|
||||
#:keys (keys '(number line comment)))
|
||||
(let loop ((lines lines)
|
||||
(number 1)
|
||||
(printed-something #f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue