lib/parser/ruby19.y in parser-2.0.0.beta5 vs lib/parser/ruby19.y in parser-2.0.0.beta6

- old
+ new

@@ -256,15 +256,15 @@ { result = @builder.logical_op(:or, val[0], val[1], val[2]) } | kNOT opt_nl expr { - result = @builder.not_op(val[0], val[2]) + result = @builder.not_op(val[0], nil, val[2], nil) } | tBANG command_call { - result = @builder.not_op(val[0], val[1]) + result = @builder.not_op(val[0], nil, val[1], nil) } | arg expr_value: expr { @@ -775,19 +775,19 @@ { result = @builder.binary_op(val[0], val[1], val[2]) } | arg tMATCH arg { - result = @builder.binary_op(val[0], val[1], val[2]) + result = @builder.match_op(val[0], val[1], val[2]) } | arg tNMATCH arg { result = @builder.binary_op(val[0], val[1], val[2]) } | tBANG arg { - result = @builder.not_op(val[0], val[1]) + result = @builder.not_op(val[0], nil, val[1], nil) } | tTILDE arg { result = @builder.unary_op(val[0], val[1]) } @@ -952,11 +952,11 @@ { result = @builder.call_method(nil, nil, val[0]) } | kBEGIN bodystmt kEND { - result = @builder.begin(val[0], val[1], val[2]) + result = @builder.begin_keyword(val[0], val[1], val[2]) } | tLPAREN_ARG expr { @lexer.state = :expr_endarg } @@ -1005,15 +1005,15 @@ result = @builder.keyword_cmd(:defined?, val[0], val[2], [ val[3] ], val[4]) } | kNOT tLPAREN2 expr rparen { - result = @builder.not_op(val[0], val[2]) + result = @builder.not_op(val[0], val[1], val[2], val[3]) } | kNOT tLPAREN2 rparen { - result = @builder.not_op(val[0]) + result = @builder.not_op(val[0], val[1], nil, val[2]) } | operation brace_block { method_call = @builder.call_method(nil, nil, val[0]) @@ -1207,10 +1207,13 @@ } then: term | kTHEN | term kTHEN + { + result = val[1] + } do: term | kDO_COND if_tail: opt_else @@ -1725,10 +1728,10 @@ compstmt tRCURLY { @lexer.cond.lexpop @lexer.cmdarg.lexpop - result = val[2] + result = @builder.begin(val[0], val[2], val[3]) } string_dvar: tGVAR { result = @builder.gvar(val[0])