Skip to content

Commit

Permalink
also in ripper, saves in_def before restoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Jan 14, 2012
1 parent d3ff2cd commit 95970e9
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions parse.y
Expand Up @@ -2953,22 +2953,16 @@ primary : literal
}
| keyword_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
Expand All @@ -2978,13 +2972,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;
}
| keyword_module cpath
{
Expand Down Expand Up @@ -3045,13 +3037,11 @@ primary : literal
in_def_named_args = 0;
#endif
local_pop();
in_def--;
cur_mid = $<id>3;
/*%
$$ = dispatch3(def, $2, $4, $5);
%*/
in_def--;
cur_mid = $<id>3;
%*/
}
| keyword_def singleton dot_or_colon {lex_state = EXPR_FNAME;} fname
{
Expand Down Expand Up @@ -3090,11 +3080,10 @@ primary : literal
in_def_named_args = 0;
#endif
local_pop();
in_single--;
/*%
$$ = dispatch5(defs, $2, $3, $5, $7, $8);
in_single--;
%*/
in_single--;
}
| keyword_break
{
Expand Down

0 comments on commit 95970e9

Please sign in to comment.