summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y11
1 files changed, 6 insertions, 5 deletions
diff --git a/parse.y b/parse.y
index 56332e3..b9ca1fa 100644
--- a/parse.y
+++ b/parse.y
@@ -282,11 +282,12 @@ static void top_local_setup();
* precedence table
*/
-%left kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD kRESCUE_MOD
+%left kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD
%left kOR kAND
%right kNOT
%nonassoc kDEFINED
%right '=' tOP_ASGN
+%left kRESCUE_MOD
%right '?' ':'
%nonassoc tDOT2 tDOT3
%left tOROP
@@ -423,10 +424,6 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem
$$ = NEW_UNTIL(cond($3), $1, 1);
}
}
- | stmt kRESCUE_MOD stmt
- {
- $$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0);
- }
| klBEGIN
{
if (in_def || in_single) {
@@ -1039,6 +1036,10 @@ arg : lhs '=' arg
{
$$ = logop(NODE_OR, $1, $3);
}
+ | arg kRESCUE_MOD arg
+ {
+ $$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0);
+ }
| kDEFINED opt_nl {in_defined = 1;} arg
{
in_defined = 0;