On Tue, 25 Apr 2006, Charles O Nutter defenestrated me: > > I'd think this is as simple as creating a node to contain comments and > sticking them in there rather than skipping them, no? Perhaps we could > even hook into RI/Rubydoc subsystem to create DocNodes too...
Yep. We create a new CommentNode perhaps more if we want to process RubyDocs. The visitor can be a noop instruction or we can strip it out. I think if we do nothing in the visitor method the JVM will optimize it out of existence. If it adds any measureable overhead we can flag it out for the interpreter (static final to kill any performance overhead). -Tom > > On 4/25/06, Thomas E Enebo <[EMAIL PROTECTED]> wrote: > > On Tue, 25 Apr 2006, Mirko Stocker defenestrated me: > > > 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. > > -- > 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 -- + 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&kid0709&bid&3057&dat1642 _______________________________________________ Jruby-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jruby-devel
