diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mirb/mirb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/mirb/mirb.c b/tools/mirb/mirb.c index 7dbd94c57..bfd81d582 100644 --- a/tools/mirb/mirb.c +++ b/tools/mirb/mirb.c @@ -55,12 +55,11 @@ bool is_code_block_open(struct mrb_parser_state *parser) { // an argument is the last token code_block_open = false; break; - case EXPR_CMDARG: - code_block_open = false; - break; // all states which are unsure + case EXPR_CMDARG: + break; case EXPR_END: // an expression was ended break; @@ -110,6 +109,9 @@ bool is_code_block_open(struct mrb_parser_state *parser) { } else if (strcmp(parser->error_buffer[0].message, "syntax error, unexpected tREGEXP_BEG") == 0) { code_block_open = true; + } else if (strcmp(parser->error_buffer[0].message, + "unterminated string meets end of file") == 0) { + code_block_open = true; } } } else { |
