summaryrefslogtreecommitdiff
path: root/tests/lispparser.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lispparser.lisp')
-rw-r--r--tests/lispparser.lisp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/lispparser.lisp b/tests/lispparser.lisp
index 61f4e47..b6dfb67 100644
--- a/tests/lispparser.lisp
+++ b/tests/lispparser.lisp
@@ -101,7 +101,7 @@
(= ch "x")
(let ((h1 (parse-hex-digit (substr 1 1 str)))
(h2 (parse-hex-digit (substr 2 1 str))))
- (list (chr (16 * h1 + h2)) (substr 3 -1 str)))
+ (list (chr (+ (* 16 h1) h2)) (substr 3 -1 str)))
(error "Invalid string escape character " ch))))
; string[input] string[string to prepend to result] -> (string[parsed till bare "] string[rest])
@@ -299,9 +299,11 @@
(print-program (lambdarec rec (items)
(if (null? items)
""
- (concat-list
- (map (lambda (i) (concat "\n" (pretty-ast i)))
- (cdr items)))))))
+ (concat
+ (pretty-ast (car items))
+ (concat-list
+ (map (lambda (i) (concat "\n" (pretty-ast i)))
+ (cdr items))))))))
(cond
(= (car ast) 'program)
(print-program (cdr ast))