Nashorn comment nodes in the syntax tree
sundararajan.athijegannathan at oracle.com
Wed Apr 27 14:18:09 UTC 2016
I filed an enhancement request:
On 4/27/2016 12:40 AM, Emilian Bold wrote:
> NetBeans used a modified Rhino that had useful features for an IDE like
> comment nodes and parser-level sanitization.
> As far as I know there is no way to get the comments in the Nashorn Tree
> API (created as part of JEP 236) or in the jdk.nashorn.internal.ir Node
> Obviously having access to comment contents and comment offsets is very
> useful. An IDE, for example, would provide code folding for the multiline
> Am I missing some proper way to get this information?
> I believe an extra option for Parser.create() would be nice (plus a
> CommentTree and a visitComment method).
More information about the nashorn-dev