mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
need read error for extra closing square brackets
* libguile/read.c (scm_read_expression): add test
This commit is contained in:
parent
5bae880e26
commit
a4e4722944
1 changed files with 4 additions and 0 deletions
|
@ -1442,6 +1442,10 @@ scm_read_expression (SCM port)
|
|||
case ')':
|
||||
scm_i_input_error (FUNC_NAME, port, "unexpected \")\"", SCM_EOL);
|
||||
break;
|
||||
case ']':
|
||||
if (SCM_SQUARE_BRACKETS_P)
|
||||
scm_i_input_error (FUNC_NAME, port, "unexpected \"]\"", SCM_EOL);
|
||||
/* otherwise fall through */
|
||||
case EOF:
|
||||
return SCM_EOF_VAL;
|
||||
case ':':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue