Forum: Ruby rkelly 1.0.0 Released

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Be30361bb0b0c495e3077db43ad84b56?d=identicon&s=25 Aaron Patterson (Guest)
on 2009-02-24 07:47
(Received via mailing list)
YES.  You read the subject line correctly.  RKelly is released.

rkelly version 1.0.0 has been released!

* <http://rkelly.rubyforge.org/>

The RKelly library will parse JavaScript and return a parse tree.

Changes:

# RKelly CHANGELOG

## 0.0.1

* Added dynamic method assignment
* Birthday!

## Example

  ##
  # Iterate over and modify a JavaScript AST.  Then print the modified
  # AST as JavaScript.
  require 'rkelly'

  parser = RKelly::Parser.new
  ast    = parser.parse(
    "for(var i = 0; i < 10; i++) { var x = 5 + 5; }"
  )

  ast.each do |node|
    node.value  = 'hello' if node.value == 'i'
    node.name   = 'hello' if node.respond_to?(:name) && node.name == 'i'
  end
  puts ast.to_ecma # => awesome javascript

* <http://rkelly.rubyforge.org/>
This topic is locked and can not be replied to.