I hope you will consider contributing some or all of this back to RDT
and JRuby; I would especially be interested in your code that
reconstructs the source file from the AST since it would allow us to
create a sort of "uneval" feature that spits out code given
already-parsed nodes. An obvious next step from there would be
spitting out Java bytecodes instead of Ruby code, and suddenly we have
a compiler.

Your work looks very interesting. Please let me and us know if there's
anything else we can do to help.

On 4/25/06, Mirko Stocker <[EMAIL PROTECTED]> wrote:
> On Tuesday 25 April 2006 16:46, Thomas E Enebo wrote:
> > This is probably an error in our positioning. I got several important
> > positions working properly, but not all of them. If you look at
> > test/testPositions.rb in our sourcecode, you can see the nodes I last
> > concentrated on. If you understand this code you can create some simple
> > unit tests to add to testPositions and I can likely figure those out (or
> > help you figure them out).
>
> Ok, I'll take a look and see what I can do.
>
> > The positions are as follows:
> > 1. index of first character for node
> > 2. index of last character for node
> > 3. start line for node
> > 4. end line for node
> >
> > Just guessing I think startIndex should be 32 and endIndex should
> > be 46 (maybe 47 if we include newline in there or not).
>
> That's what I expected, too. For our project we have to rely on correct
> positions (or have to create a workaround for the wrong ones), because we'd
> like to reconstruct the sourcefile from the AST. Well, that's what we wish we
> could do, we aren't sure if it's possible without losing too much information
> from the original file.
>
> And by the way, am I right that comments aren't in the AST? Because that's the
> next thing that gives me a headache :)
>
> Thanks!
>
> Mirko
>
>
>


--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @ www.ventera.com


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to