summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-17 06:17:51 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-17 06:17:51 +0000
commit677668eacec98fd60481a2c987c9a46dc9dd25ba (patch)
tree131c50842319a064b9ee0670849b157bac171175 /parse.y
parent864d43bf37f7b71616bba3f39669b81e770d43f3 (diff)
merges r20781 from trunk into ruby_1_9_1.
* parse.y (primary): also in ripper, saves in_def before restoring. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y21
1 files changed, 5 insertions, 16 deletions
diff --git a/parse.y b/parse.y
index 92dd38fc48..01c04744f4 100644
--- a/parse.y
+++ b/parse.y
@@ -2828,22 +2828,16 @@ primary : literal
}
| k_class tLSHFT expr
{
- /*%%%*/
$<num>$ = in_def;
in_def = 0;
- /*%
- in_def = 0;
- %*/
}
term
{
- /*%%%*/
$<num>$ = in_single;
in_single = 0;
+ /*%%%*/
local_push(0);
/*%
- $$ = in_single;
- in_single = 0;
%*/
}
bodystmt
@@ -2853,13 +2847,11 @@ primary : literal
$$ = NEW_SCLASS($3, $7);
fixpos($$, $3);
local_pop();
- in_def = $<num>4;
- in_single = $<num>6;
/*%
$$ = dispatch2(sclass, $3, $7);
- in_def = $<val>4;
- in_single = $<val>6;
%*/
+ in_def = $<num>4;
+ in_single = $<num>6;
}
| k_module cpath
{
@@ -2903,13 +2895,11 @@ primary : literal
fixpos($$, $4);
fixpos($$->nd_defn, $4);
local_pop();
- in_def--;
- cur_mid = $<id>3;
/*%
$$ = dispatch3(def, $2, $4, $5);
+ %*/
in_def--;
cur_mid = $<id>3;
- %*/
}
| k_def singleton dot_or_colon {lex_state = EXPR_FNAME;} fname
{
@@ -2931,11 +2921,10 @@ primary : literal
fixpos($$, $2);
fixpos($$->nd_defn, $2);
local_pop();
- in_single--;
/*%
$$ = dispatch5(defs, $2, $3, $5, $7, $8);
- in_single--;
%*/
+ in_single--;
}
| keyword_break
{