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

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

Issue 9950045: Implements error recovery for cases where 'var' or 'final' prefix a method def'n (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adds additional unit test Created 8 years, 9 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 71857621ca2e9d7f07c255802ee59907074836d7..85c9bfa209b2448884c87ae8f7884a1fc93d9ed8 100644
--- a/compiler/java/com/google/dart/compiler/parser/ParserErrorCode.java
+++ b/compiler/java/com/google/dart/compiler/parser/ParserErrorCode.java
@@ -56,6 +56,7 @@ public enum ParserErrorCode implements ErrorCode {
FACTORY_CANNOT_BE_ABSTRACT("A factory cannot be abstract"),
FACTORY_CANNOT_BE_STATIC("A factory cannot be static"),
FACTORY_MEMBER_IN_INTERFACE("Factory members are not allowed in interfaces"),
+ FINAL_IS_NOT_ALLOWED_ON_A_METHOD_DEFINITION("'final' is not allowed on a method definition"),
FOR_IN_WITH_COMPLEX_VARIABLE("Only simple variables can be assigned to in a for-in construct"),
FOR_IN_WITH_MULTIPLE_VARIABLES("Too many variable declarations in a for-in construct"),
FOR_IN_WITH_VARIABLE_INITIALIZER("Cannot initialize for-in variables"),
@@ -85,8 +86,10 @@ public enum ParserErrorCode implements ErrorCode {
UNEXPECTED_TOKEN("Unexpected token '%s'"),
UNEXPECTED_TOKEN_IN_STRING_INTERPOLATION("Unexpected token in string interpolation: %s"),
UNEXPECTED_TYPE_ARGUMENT("unexpected type argument"),
+ VAR_IS_NOT_ALLOWED_ON_A_METHOD_DEFINITION("'var' is not allowed on a method definition"),
VOID_FIELD("Field cannot be of type void"),
VOID_PARAMETER("Parameter cannot be of type void");
+
private final ErrorSeverity severity;
private final String message;

Powered by Google App Engine
This is Rietveld 408576698