Skip to content
Browse files

+ 1.9: Moved kRETURN/kBREAK/kNEXT from command_call to command

[git-p4: depot-paths = "//src/ruby_parser/dev/": change = 7575]
  • Loading branch information...
1 parent 3128d5a commit 35a779c9f760e97e6cc7f14438b84a7572353498 @zenspider zenspider committed Jun 21, 2012
Showing with 16 additions and 16 deletions.
  1. +1 −1 .autotest
  2. +15 −15 lib/ruby19_parser.y
View
2 .autotest
@@ -33,7 +33,7 @@ Autotest.add_hook :initialize do |at|
end
Autotest.add_hook :run_command do |at|
- system "rake parser"
+ system "rake parser DEBUG=1"
end
class Autotest
View
30 lib/ruby19_parser.y
@@ -210,21 +210,6 @@ rule
command_call: command
| block_command
- | kRETURN call_args
- {
- line = val[0].last
- result = s(:return, ret_args(val[1])).line(line)
- }
- | kBREAK call_args
- {
- line = val[0].last
- result = s(:break, ret_args(val[1])).line(line)
- }
- | kNEXT call_args
- {
- line = val[0].last
- result = s(:next, ret_args(val[1])).line(line)
- }
block_command: block_call
| block_call tDOT operation2 command_args
@@ -297,6 +282,21 @@ rule
{
result = new_yield val[1]
}
+ | kRETURN call_args
+ {
+ line = val[0].last
+ result = s(:return, ret_args(val[1])).line(line)
+ }
+ | kBREAK call_args
+ {
+ line = val[0].last
+ result = s(:break, ret_args(val[1])).line(line)
+ }
+ | kNEXT call_args
+ {
+ line = val[0].last
+ result = s(:next, ret_args(val[1])).line(line)
+ }
mlhs: mlhs_basic
| tLPAREN mlhs_entry rparen

0 comments on commit 35a779c

Please sign in to comment.
Something went wrong with that request. Please try again.