ParseTree 2.0.0 Released
Ryan Davis has released the second major version of ParseTree, a much loved Ruby library that extracts parse trees for Ruby classes and methods and returns them in an s-expression type format using standard Ruby data types. It relies on Ryan's other well known library, RubyInline. In his announcement, Ryan gives a demonstration:
As an example:
if arg1 == 0 then
[:call, [:lvar, :arg1], :==, [:array, [:lit, 0]]],
[:return, [:lit, 1]],
[:return, [:lit, 0]]]]]
There are many significant enhancements beyond the 1.x.x family, so check it out.