about summary refs log tree commit diff stats
path: root/lib/read.scm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/read.scm')
-rw-r--r--lib/read.scm10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/read.scm b/lib/read.scm index 1b611bb..f84b3a5 100644 --- a/lib/read.scm +++ b/lib/read.scm
@@ -26,7 +26,7 @@
26 (def (cdr (assoc 'default line-types)))) 26 (def (cdr (assoc 'default line-types))))
27 (cond 27 (cond
28 ((null? lin) def) ; empty line 28 ((null? lin) def) ; empty line
29 ((assoc (car lin) line-types) => cdr) ; a line type exists 29 ((assoc (car lin) line-types) => cdr) ; a known line type
30 (else def)))) ; otherwise ... 30 (else def)))) ; otherwise ...
31 31
32(define (parse-lines lines doc) 32(define (parse-lines lines doc)
@@ -48,10 +48,8 @@
48 ;;;; FIXME: I think this necessitates a special emit-verbatim 48 ;;;; FIXME: I think this necessitates a special emit-verbatim
49 ;;;; function. 49 ;;;; function.
50 (parse-verbatim (cdr lines) doc '() 50 (parse-verbatim (cdr lines) doc '()
51 #; (if (< 1 (length words)) 51 ;;; FIXME
52 (cons 'verb (cdr words)) 52 (cons 'verb (cdr words))))
53 'verb)
54 'verb))
55 (else ; another line type 53 (else ; another line type
56 (apply parse-stanza lines doc '() (line-type words))))))) 54 (apply parse-stanza lines doc '() (line-type words)))))))
57 55
@@ -67,7 +65,7 @@
67 65
68(define (parse-stanza lines doc stanza st-type 66(define (parse-stanza lines doc stanza st-type
69 #!optional (st-inlines '()) (st-words cdr)) 67 #!optional (st-inlines '()) (st-words cdr))
70 (define (close-stanza) (cons (cons st-type (reverse stanza)) doc)) 68 (define (close-stanza) (cons (cons (list st-type) (reverse stanza)) doc))
71 (if (null? lines) ; end of document 69 (if (null? lines) ; end of document
72 (parse-lines lines (close-stanza)) 70 (parse-lines lines (close-stanza))
73 (let* ((ln (car lines)) 71 (let* ((ln (car lines))