mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
bournish: Handle EOF in the reader.
* guix/build/bournish.scm (read-bournish): Add case for EOF.
This commit is contained in:
parent
febf7ef675
commit
8bebe00a76
1 changed files with 4 additions and 2 deletions
|
@ -134,8 +134,10 @@ (define %commands
|
|||
(define (read-bournish port env)
|
||||
"Read a Bournish expression from PORT, and return the corresponding Scheme
|
||||
code as an sexp."
|
||||
(match (string-tokenize (read-line port))
|
||||
((command args ...)
|
||||
(match (read-line port)
|
||||
((? eof-object? eof)
|
||||
eof)
|
||||
((= string-tokenize (command args ...))
|
||||
(match (assoc command %commands)
|
||||
((command proc) ;built-in command
|
||||
(apply proc (map expand-variable args)))
|
||||
|
|
Loading…
Reference in a new issue