[ANN] live_ast 1.0, now with transparent integration -- ParseTreefor Ruby 1.9

J

James M. Lawrence

http://quix.github.com/live_ast

Since its initial announcement, live_ast has acquired the ability to
(practically) fully emulate ParseTree for Ruby 1.9. The awkward
ast_eval stand-in for eval is no longer necessary.

The following now works on MRI and JRuby (and will work on Rubinius
when it implements more 1.9.2 features).

% gem install live_ast
% gem install boc

require 'live_ast/full'

f = eval "lambda { 'foo' }"
p f.to_ast
# => s:)iter, s:)call, nil, :lambda, s:)arglist)), nil, s:)str, "foo"))

IRB support has also been added.

live_ast continues to be a small project written in pure Ruby. The boc
extension gem is a recently-discovered loophole which enables eval to
be replaced. This must be done explicitly, however, and the default
continues to use just pure Ruby (ast_eval).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top