RFR: JDK-8206981 - Compiler support for Raw String Literals
jan.lahoda at oracle.com
Tue Aug 28 19:51:02 UTC 2018
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.
-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
--test for the case where there is a longer backtick sequence inside the
literal than is the length of the delimiter sequence (e.g. ` ``` `)
--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)
-/othervm in RawStringLiteralLangAPI is probably unnecessary?
-does the feature work in jshell? Should I take a look?
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 compiler-dev