Finish the major refactoring.
This commit is contained in:
parent
0c6b421bc5
commit
785d4bd411
3 changed files with 21 additions and 3 deletions
|
@ -31,6 +31,7 @@
|
|||
(
|
||||
print-member-info
|
||||
print-member-table
|
||||
print-member-source
|
||||
)
|
||||
|
||||
(import scheme
|
||||
|
@ -42,7 +43,9 @@
|
|||
member-record
|
||||
month
|
||||
utils
|
||||
table)
|
||||
table
|
||||
listing
|
||||
ansi)
|
||||
|
||||
;; Prints human-readable information
|
||||
(define (print-member-info mr)
|
||||
|
@ -116,4 +119,19 @@
|
|||
(result (filter identity (append head body))))
|
||||
(print (table->string result #:table-border #t #:row-border #t #:col-border #t))))
|
||||
|
||||
;; Nicely prints the member source with any errors recorded.
|
||||
(define (print-member-source mr)
|
||||
(let* ((lines (dict-ref mr 'source mr))
|
||||
(file-name (dict-ref mr 'file-name))
|
||||
(hls (dict-ref mr 'highlights)))
|
||||
(print file-name ":")
|
||||
(print-source-listing
|
||||
lines
|
||||
hls
|
||||
-1
|
||||
a:error a:default
|
||||
"" "" ; Not used
|
||||
"..." ; Not used
|
||||
)))
|
||||
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue