On Tue, 25 Apr 2006, Mirko Stocker defenestrated me:

> On Tuesday 25 April 2006 16:46, Thomas E Enebo wrote:
> 
> > ? 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 :)

  We don't and neither does C Ruby.  Our parser is based on theirs and
we both eat comments in the lexing process.  We could consider preserving
them in the AST (and only turn this on as an option).  I suspect all the
Ruby IDEs using JRuby will want this at some point anyways.

-Tom

-- 
+ http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+
| Thomas E Enebo, Protagonist  | "Luck favors the prepared    |
|                              |  mind." -Louis Pasteur       |


-------------------------------------------------------
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&kid=120709&bid=263057&dat=121642
_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to