summaryrefslogtreecommitdiff
path: root/Src/parse.c
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2000-05-27 08:32:58 +0000
committerBart Schaefer <barts@users.sourceforge.net>2000-05-27 08:32:58 +0000
commit47532f255ef58d9e0e5bd6c909b3a7008e35ee43 (patch)
tree17b92f13e2d0702a681957088ebfdb03458caa10 /Src/parse.c
parent17aadf0338940aae841e67b50ae412687d6cc9ec (diff)
downloadzsh-47532f255ef58d9e0e5bd6c909b3a7008e35ee43.tar.gz
zsh-47532f255ef58d9e0e5bd6c909b3a7008e35ee43.zip
11606: Propagate parse errors out of parse_list() and parse_event(), and
test that it worked.
Diffstat (limited to 'Src/parse.c')
-rw-r--r--Src/parse.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Src/parse.c b/Src/parse.c
index 453e45ad0..5e90984ac 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -459,6 +459,7 @@ par_event(void)
}
}
if (!r) {
+ tok = LEXERR;
if (errflag) {
yyerror(0);
ecused--;
@@ -491,10 +492,8 @@ parse_list(void)
yylex();
init_parse();
par_list(&c);
-#if 0
- if (tok == LEXERR)
-#endif
- if (tok != ENDINPUT) {
+ if (tok != ENDINPUT) {
+ tok = LEXERR;
yyerror(0);
return NULL;
}