RFR: JDK-8206981 - Compiler support for Raw String Literals

Jim Laskey james.laskey at oracle.com
Wed Aug 29 16:43:00 UTC 2018


Thank you Jan. Updated webrev in http://cr.openjdk.java.net/~jlaskey/8206981/webrev-01/index.html .

Cheers,

— Jim

> On Aug 28, 2018, at 4:51 PM, Jan Lahoda <jan.lahoda at oracle.com> wrote:
> 
> Hi Jim,
> 
> Overall looks OK. A few comments:
> -when there's an attempt to open a raw string literal with \u0060, seems the error would be:
> 
> illegal character: '\u0060 in raw string literal delimiter'
> 
> where the "\u0060 in raw string literal delimiter" is hardcoded in the source. It would be better if this text would be localizable.

Updated

> 
> -it would be nice if the following tests could be added (unless they already exist and I missed them):
> --test for '\r\n' and '\r’ handling

Added

> --test for the case where there is a longer backtick sequence inside the literal than is the length of the delimiter sequence (e.g. ` ``` `)

Already there. j varies the inside sequence independently of i (open) and k (close).

> --test where a (valid or invalid) raw string literal ends at the very end of the input sequence (not a valid source code, but still might be good to ensure the logic works)

Added
> 
> -/othervm in RawStringLiteralLangAPI is probably unnecessary?

Hangs without it.

> 
> -does the feature work in jshell? Should I take a look?
> 
> Jan
> 
> 
> On 27.8.2018 18:13, Jim Laskey wrote:
>> Please review the following changeset to implement raw string literals in javac as per JEP 326.
>> 
>> Thank you,
>> 
>> — Jim
>> 
>> WEBREV: http://cr.openjdk.java.net/~jlaskey/8206981/webrev/index.html
>> 
>> 
>> JEP: https://bugs.openjdk.java.net/browse/JDK-8196004
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8206981
>> CSR: https://bugs.openjdk.java.net/browse/JDK-8198986
>> 



More information about the amber-dev mailing list