[Parsetree] (J)Ruby (j)parsetree
Eric Hodel
drbrain at segment7.net
Mon Dec 4 11:36:52 PST 2006
On Nov 9, 2006, at 06:52 , Werner Schuster (murphee) wrote:
> In case someone's interested in JRuby, I'm working on a JRuby version
> of parsetree.
>
> It's about 80% compliant at the moment (ie. 80% of the ParseTree tests
> work)... a value that hopefully soon jumps to 100 % (I'm waiting for
> some JRuby changes, and I'll need some digging to do the runtime AST
> extraction thing).
>
> It's available as part of the http://jruby-extras.rubyforge.org/
> project, the source can be viewed in:
> http://rubyforge.org/cgi-bin/viewvc.cgi/trunk/jparsetree/?
> root=jruby-extras
>
>
> I didn't include the full package (test suite and all) because I
> wanted
> to ask if that'd be OK first (I know it's MIT licensed, but still...).
There's a reason why its called 'open source'. (It would be
courteous, of course, to give appropriate credit.)
> I also had another question:
>
> I'm not sure about the handling of :dsym or :dstr: parsetree gives
> something like [:dstr, "hello"], where as I get [:dstr, [:str,
> "hello"]]
> from my version; wouldn't it be more consistent to do the second
> version, or is there a reason for putting the string literal in there
> instead of the [:str, "hello"]
That's the way the C AST is built. Even if the string is "#{blah}"
there's still that empty string at the front. I believe all of our
downstream tools expect that string, but I'm not sure.
--
Eric Hodel - drbrain at segment7.net - http://blog.segment7.net
I LIT YOUR GEM ON FIRE!
More information about the Parsetree
mailing list