there may be expecting here-doc when we see terminating characters; fix #2780

This commit is contained in:
Yukihiro "Matz" Matsumoto
2015-05-20 19:12:31 +09:00
parent bce3843456
commit b7049b3945
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -2108,6 +2108,7 @@ codegen(codegen_scope *s, node *tree, int val)
if (val) {
node *n = tree;
if (!n) break;
codegen(s, n->car, VAL);
n = n->cdr;
while (n) {
+1 -2
View File
@@ -4116,10 +4116,9 @@ parser_yylex(parser_state *p)
retry:
last_state = p->lstate;
switch (c = nextc(p)) {
case '\0': /* NUL */
case '\004': /* ^D */
case '\032': /* ^Z */
return 0;
case '\0': /* NUL */
case -1: /* end of script. */
if (p->heredocs_from_nextline)
goto maybe_heredoc;