Commits

Moritz Heidkamp  committed 2eb9de9

Rename parser-input-data to parser-input->lazy-seq

  • Participants
  • Parent commits eabe7ff

Comments (0)

Files changed (1)

File comparse.scm

  memo-table
  ->parser-input
  parser-input?
- parser-input-data
+ parser-input->lazy-seq
  parser-input->list
  parser-input->string
  parser-input-end?)
           (parser input)))))))
 
 (define-record-type parser-input
-  (make-parser-input data)
+  (make-parser-input lazy-seq)
   parser-input?
-  (data parser-input-data))
+  (lazy-seq parser-input->lazy-seq))
 
 (define-record-printer (parser-input input out)
   (display "#<parser-input" out)
-  (let ((seq (parser-input-data input)))
+  (let ((seq (parser-input->lazy-seq input)))
     (if (lazy-null? seq)
         (display "-end>" out)
         (let loop ((n 10)
               (display " ...>" out))))))
 
 (define (parser-input-end? input)
-  (lazy-null? (parser-input-data input)))
+  (lazy-null? (parser-input->lazy-seq input)))
 
 (define (parser-input->list input)
-  (lazy-seq->list (parser-input-data input)))
+  (lazy-seq->list (parser-input->lazy-seq input)))
 
 (define (parser-input->string input)
   (list->string (parser-input->list input)))
 
 (define (->lazy-seq location x)
   (cond ((lazy-seq? x) x)
-        ((parser-input? x) (parser-input-data x))
+        ((parser-input? x) (parser-input->lazy-seq x))
         ((string? x) (list->lazy-seq (string->list x)))
         ((list? x) (list->lazy-seq x))
         ((input-port? x) (input-port->lazy-seq x read-char))