mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8058542: Devise scheme for better diagnostic creation
Add support for generating (at build-time) an enum-like class containing all javac diagnostics, which allows for safe diagnostic creation. Reviewed-by: jlahoda, jjg, vromero, erikj, jfranck
This commit is contained in:
parent
5cb7065612
commit
56a33e4541
26 changed files with 1825 additions and 132 deletions
|
@ -31,7 +31,9 @@ import java.util.regex.Pattern;
|
|||
*/
|
||||
class MessageFile {
|
||||
static final Pattern emptyOrCommentPattern = Pattern.compile("( *#.*)?");
|
||||
static final Pattern infoPattern = Pattern.compile("# ([0-9]+: [-A-Za-z ]+, )*[0-9]+: [-A-Za-z ]+");
|
||||
static final Pattern typePattern = Pattern.compile("[-\\\\'A-Z\\.a-z ]+( \\([A-Za-z 0-9]+\\))?");
|
||||
static final Pattern infoPattern = Pattern.compile(String.format("# ([0-9]+: %s, )*[0-9]+: %s",
|
||||
typePattern.pattern(), typePattern.pattern()));
|
||||
|
||||
/**
|
||||
* A line of text within the message file.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue