1
Fork 0
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:
Michael Gran 2010-11-04 22:07:50 -07:00
parent 5bae880e26
commit a4e4722944

View file

@ -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 ':':