Re: Tree API: offsets for String fields

2016-05-13 Thread Emilian Bold
Thank you! PS: It would be great if JBS would allow me to register for email updates on issues I care about... --emi On Thu, May 12, 2016 at 8:10 PM, Sundararajan Athijegannathan < sundararajan.athijegannat...@oracle.com> wrote: > Filed: https://bugs.openjdk.java.net/browse/JDK-8156866 > > PS.

Re: Tree API: offsets for String fields

2016-05-12 Thread Sundararajan Athijegannathan
Filed: https://bugs.openjdk.java.net/browse/JDK-8156866 PS. Actually, I was wrong about MemberSelectTree - even internally nashorn IR node "AccessNode" maintains 'property' as a String. But, variables, functions have identifier nodes for names. Thanks, -Sundar On 5/12/2016 10:20 PM, Emilian Bo

Re: Tree API: offsets for String fields

2016-05-12 Thread Emilian Bold
Assuming I don't need some special permissions to do that (do I?) I could expand the previous email and post it as an enhancement on https://bugs.openjdk.java.net But I'm also trying to understand the logic behind what you have. The way I see it any AST node has some underlying tokens so its offs

Re: Tree API: offsets for String fields

2016-05-12 Thread Sundararajan Athijegannathan
Hi, Thanks for your comments. Nashorn Parser API was modeled after similar API provided by javac - for consistency sake and to leverage developer familiarity. For example, ContinueTree, MemberSelectTree of javac Tree API: https://docs.oracle.com/javase/8/docs/jdk/api/javac/tree/com/sun/source/tr

Tree API: offsets for String fields

2016-05-12 Thread Emilian Bold
Hello, It's really important for a Javascript editor to know the offsets of each syntax tree node and of whatever the node contains (I'm not really saying tokens but... constituent parts and keywords are the minimum). So it would be great to provide or document how offsets are to be computed for