From: Ryan Davis Date: 2009-08-05T07:29:24+09:00 Subject: Re: Kind of ParsTree for 1.9.1 On Aug 3, 2009, at 23:20 , Macario Ortega wrote: > Hi, I've been missing ParseTree very badly in 1.9.1. So in my > naivité I > decided to try to convert YARV iseq's to Sexp's similar of those > produced by ParseTree. So far I can convert simple expressions, method > calls, nested method calls, arrays, hashes, I can extract method > parameter and default values provided the expression is not too > complicated. > At first it seemed easy until I hitted control structures. > > Is someone aware of a similar effort? > > Does anyone else craves AST manipulation in 1.9.1 as bad as me? > > Anyone care to join? This is pretty awesome. It is gonna only get worse tho. :) We talked about doing this a while back and came to the conclusion that it was more work than we were interested in investing. Please prove us wrong and you'll get a least a couple beers at the next rubyconf. A suggestion: Use test/pt_testcase.rb from the ParseTree project and you'll be a LOT happier. See the test cases from either ruby2c or ruby_parser as examples of test reuse.