Hi!

I'm currently analyzing the JRuby AST to create refactorings for the RDT. To 
analyze the AST, im just stepping through it with the Debugger, and i'm 
wondering if the SourcePositions in the AST are correct. with this Class:

class Test
  def initialize
    @field = "test"
  end
end

the InstAsgnNode has the position 37-40, which certainly isn't correct, or am 
I mistaken? This range includes 'd = ', but I expected '@field'. Which leads 
my to my next question, how is the counting of the ranges meant?  Is '37' the 
index or the 37th character? What about newlines? I'd really appreciate your 
help, I think I'm quite confused at the moment :-)

Thanks!

Mirko Stocker

PS: If somebody is interested in our work, our project-website is located at 
http://morki.ch/rubyrefactoring (it's in german).

Attachment: pgpvXGsig7RVt.pgp
Description: PGP signature

Reply via email to