Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Extracting Comments with the AST interface

23 views
Skip to first unread message

Charles Lowell

unread,
Feb 1, 2009, 5:17:53 PM2/1/09
to
Hi,

I can't seem to get the actual value of the comments out of a parse
tree without doing the offset/length math. Is this by design? Wouldn't
it be more useful to be able to have comment.getValue() or
comment.getText() to return the actual text of the comment minus the
delimiters?

I'd be happy to give implementing this a shot if that's the eventual
plan.

cheers,
Charles

Charles Lowell

unread,
Feb 3, 2009, 6:16:49 AM2/3/09
to


Any takers?

Norris Boyd

unread,
Feb 3, 2009, 10:08:13 AM2/3/09
to

I forwarded your question to the creator of the AST interface. He's
doing a big refactoring of the new AST code so it's a smaller delta
from previous Rhino versions, so perhaps it's worth waiting for that
refactoring to be complete.

Thanks,
Norris

Norbert Hartl

unread,
Feb 18, 2009, 6:38:38 AM2/18/09
to Norris Boyd, dev-tech-js-...@lists.mozilla.org

Is there a snapshot of the refactoring available? I didn't find anything
in the CVS. And I would like to know if the interface is changed to
utilize method signatures instead of down casting every Node to the most
generic interface.

thanks,

Norbert

0 new messages