mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
there may be expecting here-doc when we see terminating characters; fix #2780
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user