mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #1145 from h2so5/fix-mirb
Improve checking for unterminated string in mirb
This commit is contained in:
+3
-3
@@ -38,9 +38,6 @@ is_code_block_open(struct mrb_parser_state *parser)
|
||||
{
|
||||
int code_block_open = FALSE;
|
||||
|
||||
/* check for unterminated string */
|
||||
if (parser->lex_strterm) return TRUE;
|
||||
|
||||
/* check for heredoc */
|
||||
if (parser->heredoc_starts_nextline) return TRUE;
|
||||
if (parser->heredoc_end_now) {
|
||||
@@ -70,6 +67,9 @@ is_code_block_open(struct mrb_parser_state *parser)
|
||||
return code_block_open;
|
||||
}
|
||||
|
||||
/* check for unterminated string */
|
||||
if (parser->lex_strterm) return TRUE;
|
||||
|
||||
switch (parser->lstate) {
|
||||
|
||||
/* all states which need more code */
|
||||
|
||||
Reference in New Issue
Block a user