Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1302)

Unified Diff: compiler/java/com/google/dart/compiler/parser/ParserErrorCode.java

Issue 10555034: Fix parse error on dead code in a switch statement (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: # Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: compiler/java/com/google/dart/compiler/parser/ParserErrorCode.java
diff --git a/compiler/java/com/google/dart/compiler/parser/ParserErrorCode.java b/compiler/java/com/google/dart/compiler/parser/ParserErrorCode.java
index d6b3af708143dfa0347094b4845a7ccedc136ba5..ceea8730c372fe04773d0e92ffd9e40e7538a147 100644
--- a/compiler/java/com/google/dart/compiler/parser/ParserErrorCode.java
+++ b/compiler/java/com/google/dart/compiler/parser/ParserErrorCode.java
@@ -74,6 +74,7 @@ public enum ParserErrorCode implements ErrorCode {
INVALID_FIELD_DECLARATION("Wrong syntax for field declaration"),
INVALID_IDENTIFIER("The token '%s' cannot be used as an identifier"),
INVALID_OPERATOR_CHAINING("Cannot chain '%s'"),
+ LABEL_NOT_FOLLOWED_BY_CASE_OR_DEFAULT("Label not followed by 'case', 'default', or statement"),
LOCAL_CANNOT_BE_STATIC("Local function cannot be static"),
MISSING_FUNCTION_NAME("a function name is required for a declaration"),
NAMED_PARAMETER_NOT_ALLOWED("Named parameter is not allowed for operator or setter method"),
@@ -95,6 +96,7 @@ public enum ParserErrorCode implements ErrorCode {
SUPER_IS_NOT_VALID_ALONE_OR_AS_A_BOOLEAN_OPERAND(
"'super' is not valid alone or as a boolean operand"),
TOP_LEVEL_CANNOT_BE_STATIC("Top-level field or method cannot be static"),
+ UNREACHABLE_CODE_IN_CASE(ErrorSeverity.WARNING, "Unreachable code in case statement"),
UNEXPECTED_TOKEN("Unexpected token '%s'"),
UNEXPECTED_TOKEN_IN_STRING_INTERPOLATION("Unexpected token in string interpolation: %s"),
UNEXPECTED_TYPE_ARGUMENT("unexpected type argument"),

Powered by Google App Engine
This is Rietveld 408576698