1.1--- a/lisp/lib/organ/util.lisp Wed Dec 27 21:07:07 2023 -0500
1.2+++ b/lisp/lib/organ/util.lisp Wed Dec 27 23:47:25 2023 -0500
1.3@@ -5,6 +5,19 @@
1.4 ;;; Code:
1.5 (in-package :organ)
1.6
1.7+(defun peek-line (stream)
1.8+ (concatenate
1.9+ 'string
1.10+ (loop for c = (peek-char nil stream nil :eof)
1.11+ until (char= c #\newline)
1.12+ collect c)))
1.13+
1.14+(defun read-until-end (stream)
1.15+ (with-output-to-string (s)
1.16+ (loop for c = (read-char stream nil :eof)
1.17+ until (eql c :eof)
1.18+ do (write-char c s))))
1.19+
1.20 (defun read-org-lines (&optional stream)
1.21 (apply #'vector
1.22 (loop for l = (read-line stream nil :eof)