diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-24 15:18:00 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-24 15:18:00 +0000 |
commit | e8e3f56b8174efde3262040d6095b535da0e3512 (patch) | |
tree | f45b9462ec6fabd0f33014e0ae842bafc40e52ec | |
parent | 05b4ec8683884ac9bd6ccde53e351ffe6562dc3d (diff) | |
download | ruby-e8e3f56b8174efde3262040d6095b535da0e3512.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | parse.y | 13 |
2 files changed, 11 insertions, 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> * eval.c (rb_eval): NODE_EVSTR is no longer used. @@ -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> 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> 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> mlhs mlhs_head mlhs_basic mlhs_entry mlhs_item mlhs_node %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 %token tUPLUS /* unary+ */ %token tUMINUS /* unary- */ @@ -1883,7 +1883,7 @@ string_content : tSTRING_CONTENT {$$ = NEW_STR($1);} { lex_strnest = $<num>1; lex_strterm = $<node>2; - $$ = gettable($3); + $$ = $3; } | tSTRING_DBEG term_push { @@ -1904,9 +1904,10 @@ string_content : tSTRING_CONTENT {$$ = NEW_STR($1);} } ; -string_dvar : tGVAR - | tIVAR - | tCVAR +string_dvar : tGVAR {$$ = NEW_GVAR($1);} + | tIVAR {$$ = NEW_IVAR($1);} + | tCVAR {$$ = NEW_CVAR($1);} + | backref ; term_push : /* */ |