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

List:       openjdk-compiler-dev
Subject:    Re: RFR: 8259050: Error recovery in lexer could be improved
From:       Vicente Romero <vromero () openjdk ! java ! net>
Date:       2021-01-27 6:36:42
Message-ID: jLEV6RIt3f41taFHQv_uEVv3qDSS6rH2HvHUgeYn0vI=.6c2184a2-397c-45bf-9b9b-733e061f789c () github ! com
[Download RAW message or body]

On Tue, 26 Jan 2021 14:00:20 GMT, Jan Lahoda <jlahoda@openjdk.org> wrote:

> Consider code like:
> public class BrokenEscape {
> private String s = "\uaaa";
> }
> (note the broken escape). This produces:
> $ javac BrokenEscape.java 
> BrokenEscape.java:2: error: illegal unicode escape
> private String s = "\uaaa";
> ^
> BrokenEscape.java:2: error: unclosed string literal
> private String s = "\uaaa";
> ^
> 2 errors
> 
> After this patch, it produces:
> $ javac BrokenEscape.java 
> BrokenEscape.java:2: error: illegal unicode escape
> private String s = "\uaaa";
> ^
> 1 error
> which is the error message that used to be produced in the past.
> 
> The patch also improves the AST for source levels where text blocks are not \
> supported, but are in fact present in the source code.

looks sensible

-------------

Marked as reviewed by vromero (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2239


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

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