mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (string_dvar): allow back references in interpolation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
05b4ec8683
commit
e8e3f56b81
2 changed files with 11 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Jun 25 00:14:07 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
* parse.y (string_dvar): allow back references in interpolation.
|
||||||
|
|
||||||
Mon Jun 24 16:32:31 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Mon Jun 24 16:32:31 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* eval.c (rb_eval): NODE_EVSTR is no longer used.
|
* eval.c (rb_eval): NODE_EVSTR is no longer used.
|
||||||
|
|
13
parse.y
13
parse.y
|
@ -235,11 +235,11 @@ static void top_local_setup();
|
||||||
%type <node> command_args aref_args opt_block_arg block_arg var_ref var_lhs
|
%type <node> command_args aref_args opt_block_arg block_arg var_ref var_lhs
|
||||||
%type <node> mrhs mrhs_basic superclass block_call block_command
|
%type <node> mrhs mrhs_basic superclass block_call block_command
|
||||||
%type <node> f_arglist f_args f_optarg f_opt f_block_arg opt_f_block_arg
|
%type <node> f_arglist f_args f_optarg f_opt f_block_arg opt_f_block_arg
|
||||||
%type <node> assoc_list assocs assoc undef_list backref
|
%type <node> assoc_list assocs assoc undef_list backref string_dvar
|
||||||
%type <node> block_var opt_block_var brace_block do_block lhs none
|
%type <node> block_var opt_block_var brace_block do_block lhs none
|
||||||
%type <node> mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node
|
%type <node> mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node
|
||||||
%type <id> fitem variable sym symbol operation operation2 operation3
|
%type <id> fitem variable sym symbol operation operation2 operation3
|
||||||
%type <id> cname fname op f_rest_arg string_dvar
|
%type <id> cname fname op f_rest_arg
|
||||||
%type <num> f_norm_arg f_arg term_push
|
%type <num> f_norm_arg f_arg term_push
|
||||||
%token tUPLUS /* unary+ */
|
%token tUPLUS /* unary+ */
|
||||||
%token tUMINUS /* unary- */
|
%token tUMINUS /* unary- */
|
||||||
|
@ -1883,7 +1883,7 @@ string_content : tSTRING_CONTENT {$$ = NEW_STR($1);}
|
||||||
{
|
{
|
||||||
lex_strnest = $<num>1;
|
lex_strnest = $<num>1;
|
||||||
lex_strterm = $<node>2;
|
lex_strterm = $<node>2;
|
||||||
$$ = gettable($3);
|
$$ = $3;
|
||||||
}
|
}
|
||||||
| tSTRING_DBEG term_push
|
| tSTRING_DBEG term_push
|
||||||
{
|
{
|
||||||
|
@ -1904,9 +1904,10 @@ string_content : tSTRING_CONTENT {$$ = NEW_STR($1);}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
string_dvar : tGVAR
|
string_dvar : tGVAR {$$ = NEW_GVAR($1);}
|
||||||
| tIVAR
|
| tIVAR {$$ = NEW_IVAR($1);}
|
||||||
| tCVAR
|
| tCVAR {$$ = NEW_CVAR($1);}
|
||||||
|
| backref
|
||||||
;
|
;
|
||||||
|
|
||||||
term_push : /* */
|
term_push : /* */
|
||||||
|
|
Loading…
Reference in a new issue