RFR: JDK-8223782: jshell parser should handle Text Blocks
Jan Lahoda
jan.lahoda at oracle.com
Mon Jun 3 13:27:00 UTC 2019
Hi,
In order to support text blocks (JEP 355) in JShell, it seems the main
thing is to correctly detect snippet completion - after that, the
ordinary javac parser should be able to handle the snippet. Proposed
update to the completeness detection, based on how block comments are
handled:
http://cr.openjdk.java.net/~jlahoda/8223782/webrev.00/
This also removes support for raw string literals.
The detection current marks invalid text blocks (such that they don't
have a newline after the opening """) as incomplete - when the snippet
is finished, the standard javac parser should handle that properly (and
the user has an opportunity to edit the snippet to be proper).
JBS: https://bugs.openjdk.java.net/browse/JDK-8223782
What do you think?
Thanks,
Jan
More information about the kulla-dev
mailing list