mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
* read.c (scm_lreadr): Encountering EOF after skipping a SCSH
style block comment is no longer considered an error.
This commit is contained in:
parent
4ecd21bc8c
commit
b6356af70f
1 changed files with 4 additions and 1 deletions
|
@ -283,6 +283,7 @@ scm_lreadr (tok_buf, port, case_i, sharp, copy)
|
||||||
|
|
||||||
tryagain:
|
tryagain:
|
||||||
c = scm_flush_ws (port, s_read);
|
c = scm_flush_ws (port, s_read);
|
||||||
|
tryagain_no_flush_ws:
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case EOF:
|
case EOF:
|
||||||
|
@ -363,7 +364,9 @@ tryagain:
|
||||||
/* start of a shell script. Parse as a block comment,
|
/* start of a shell script. Parse as a block comment,
|
||||||
terminated by !#, just like SCSH. */
|
terminated by !#, just like SCSH. */
|
||||||
skip_scsh_block_comment (port);
|
skip_scsh_block_comment (port);
|
||||||
goto tryagain;
|
/* EOF is not an error here */
|
||||||
|
c = scm_flush_ws (port, (char *)NULL);
|
||||||
|
goto tryagain_no_flush_ws;
|
||||||
|
|
||||||
case '*':
|
case '*':
|
||||||
j = scm_read_token (c, tok_buf, port, case_i, 0);
|
j = scm_read_token (c, tok_buf, port, case_i, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue