Replace cast tags for tSTRING_DVAR with typed midrule actions

This commit is contained in:
Nobuyoshi Nakada 2024-05-19 00:27:34 +09:00
parent 232f7b37cf
commit fd8e6e8c54
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -6308,13 +6308,13 @@ string_content : tSTRING_CONTENT
| tSTRING_DVAR
{
/* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
$<strterm>$ = p->lex.strterm;
$$ = p->lex.strterm;
p->lex.strterm = 0;
SET_LEX_STATE(EXPR_BEG);
}
}<strterm>
string_dvar
{
p->lex.strterm = $<strterm>2;
p->lex.strterm = $2;
$$ = NEW_EVSTR($3, &@$);
nd_set_line($$, @3.end_pos.lineno);
/*% ripper: string_dvar!($:3) %*/