[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-nashorn-dev
Subject:    Re: Review request for JDK-8156714: Parsing issue with automatic semicolon insertion
From:       Sundararajan Athijegannathan <sundararajan.athijegannathan () oracle ! com>
Date:       2016-05-13 16:24:41
Message-ID: de12665b-3e5d-d6be-902a-d8f679ef5eff () oracle ! com
[Download RAW message or body]

+1


On 5/13/2016 9:22 PM, Hannes Wallnoefer wrote:
> Please review JDK-8156714: Parsing issue with automatic semicolon
> insertion:
>
> http://cr.openjdk.java.net/~hannesw/8156714/webrev/
>
> Comments are irrelevant for newline detection so we should ignore them
> when assigning to AbstractParser.last.
>
> Note that this causes three endPositions to change in
> test/script/nosecurity/parserapi.js.EXPECTED. This is caused by the
> parser API no longer including trailing comments to functions.
>
> For example consider the following code (taken from parserapi.js
> itself, this is the first changed endPosition):
>
> function Parser() {
>     // create nashorn parser
>     this._parser = Parser.create();
> }
>
> // Java types used
>
>
> Previously the endPosition of the Parser function would be the end of
> the trailing comment. With this change, the function's endPosition is
> before the trailing comment starts, which seems more correct.
>
> Hannes

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic