Permalink
Browse files

Flattened resbodies in rescue node. Fixed .autotest file.

From p4 revision #4229

git-svn-id: http://parsetree.rubyforge.org/svn/ruby_parser/dev@364 7a5a0b6c-800e-4c83-962a-1aaaaaa870b8
  • Loading branch information...
1 parent 4fb8e69 commit 051b46cf177ab8f739b24159c78588261789110b zenspider committed Sep 25, 2008
Showing with 9 additions and 2 deletions.
  1. +1 −1 .autotest
  2. +8 −1 lib/ruby_parser.y
View
@@ -4,7 +4,7 @@ require 'autotest/restart'
Autotest.add_hook :initialize do |at|
at.extra_files << "../../ParseTree/dev/test/pt_testcase.rb"
- at.libs << ":../../ParseTree/dev/lib:../../ParseTree/dev/test"
+ at.libs << ":../../ParseTree/dev/lib:../../ParseTree/dev/test:../../sexp_processor/dev/lib"
at.add_exception 'unit'
at.add_exception 'coverage'
at.add_exception '.diff'
View
@@ -57,7 +57,14 @@ bodystmt : compstmt opt_rescue opt_else opt_ensure {
if val[1] then
result = s(:rescue)
result << val[0] if val[0]
- result << val[1]
+
+ resbody = val[1]
+
+ while resbody do
+ result << resbody
+ resbody = resbody.resbody(true)
+ end
+
result << val[2] if val[2]
result.line = val[1].line

0 comments on commit 051b46c

Please sign in to comment.