Throw an error when missing a single quote
We used to loop forever here because of the lack of 'eof-object?' test! * geesh/lexer.scm (get-single-quotation): Throw an error on unexpected end-of-file.
This commit is contained in:
parent
48e122c42f
commit
91cfdac307
|
@ -365,6 +365,7 @@ next character statisfies @var{pred} (or is a newline)."
|
|||
(#\'
|
||||
(let loop ((chr (get-char port)) (acc '()))
|
||||
(match chr
|
||||
((? eof-object?) (throw 'lex-error))
|
||||
(#\' `(<sh-quote> ,(list->string (reverse! acc))))
|
||||
(x (loop (get-char port) (cons x acc))))))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue