Fixed up to use a read-line loop

This commit is contained in:
Justin Ethier 2016-09-28 17:11:47 -04:00
parent 16242a980e
commit 9830a8184a

View file

@ -1,8 +1,15 @@
;;;; Cyclone Scheme
;;;; https://github.com/justinethier/cyclone
;;;;
;;;; Copyright (c) 2014-2016, Justin Ethier
;;;; All rights reserved.
;;;;
;;;; A simple program to format links for the API index page.
;;;;
(import (import
(scheme base) (scheme base)
(scheme write) (scheme write)
(scheme cyclone util) (scheme cyclone util))
(srfi 1))
;; TODO: move this somewhere useful ;; TODO: move this somewhere useful
(define (index-of lst x) (define (index-of lst x)
@ -29,8 +36,11 @@
(string-append (string-append
"[`" fnc "`](" file "#" fnc ")"))) "[`" fnc "`](" file "#" fnc ")")))
;(display (convert-line line))
(define (loop)
(let ((line (read-line)))
(when (not (eof-object? line))
(display (convert-line line)) (display (convert-line line))
;(define (loop) (newline)
; (let ((line (read-line))) (loop))))
; (if (not (eof? line)) (loop)
; (display (convert-line line)))))