Skip to content

Commit

Permalink
flush delayed token
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Jan 20, 2012
1 parent e1b0b51 commit 15068ae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions parse.y
Expand Up @@ -6004,6 +6004,18 @@ parser_parse_string(struct parser_params *parser, NODE *quote)

tokfix();
set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));

#ifdef RIPPER
if (!NIL_P(parser->delayed)){
ptrdiff_t len = lex_p - parser->tokp;
if (len > 0) {
rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc);
}
ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
parser->tokp = lex_p;
}
#endif

return tSTRING_CONTENT;
}

Expand Down

0 comments on commit 15068ae

Please sign in to comment.