diff options
Diffstat (limited to 'csc/compare.csc')
| -rw-r--r-- | csc/compare.csc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/csc/compare.csc b/csc/compare.csc index ab7e3c1..dea2366 100644 --- a/csc/compare.csc +++ b/csc/compare.csc @@ -76,17 +76,17 @@ (define (pretty w x indent) (cond + ((and (pair? x) + (symbol? (car x))) + (fprintf w "{} ({} .\n" indent (car x)) + (pretty w (cdr x) (string-append indent " ")) + (fprintf w "{} )\n" indent)) ((list? x) (fprintf w "{} (\n" indent) (loop with new-indent = (string-append indent " ") for v in x do (pretty w v new-indent)) (fprintf w "{} )\n" indent)) - ((and (pair? x) - (symbol? (car x))) - (fprintf w "{} ({} .\n" indent (car x)) - (pretty w (cdr x) (string-append indent " ")) - (fprintf w "{} )\n" indent)) (else (fprintf w "{} {}\n" indent x)))) @@ -191,13 +191,13 @@ (and (string? s) (contains s "\n"))) (lambda (s) - (list (cons 'type 'string) + (list (cons '!type 'string) (cons 'value (split s "\n"))))) (cons vector? (lambda (v) - (list (cons 'type 'vector) + (list (cons '!type 'vector) (cons 'value (vector->list v))))) (cons bytevector? (lambda (b) - (list (cons 'type 'bytevector) + (list (cons '!type 'bytevector) (cons 'value (loop for i below (bytevector-length b) collect (string-append "0x" (number->string (bytevector-u8-ref b i)))))))))) |
