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

Unified Diff: compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java

Issue 8231031: Check for compile-time constants in DartCompiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Feedback from floitsch Created 9 years, 2 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/DartCompilerErrorCode.java
diff --git a/compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java b/compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java
index 97f2d337f934cb709895a7be54622d8d104eb395..59661a80cf897e5f1aa33382d7751e6b62c9e10b 100644
--- a/compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java
+++ b/compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java
@@ -39,7 +39,7 @@ public enum DartCompilerErrorCode implements ErrorCode {
CONSTRUCTOR_CANNOT_BE_ABSTRACT("A constructor cannot be asbstract"),
CONSTRUCTOR_CANNOT_BE_STATIC("A constructor cannot be static"),
CONSTRUCTOR_MUST_CALL_SUPER("Constructors must call super constructor"),
- CONST_CONSTRUCTOR_CANNOT_HAVE_BODY("A cconst onstructor cannot have a body"),
+ CONST_CONSTRUCTOR_CANNOT_HAVE_BODY("A const constructor cannot have a body"),
CONST_CONSTRUCTOR_MUST_CALL_CONST_SUPER("const constructor must call const super constructor"),
CONSTANTS_MUST_BE_INITIALIZED("constants must be initialized"),
CYCLIC_CLASS("%s causes a cycle in the supertype graph"),
@@ -60,6 +60,12 @@ public enum DartCompilerErrorCode implements ErrorCode {
EXPECTED_COMMA_OR_RIGHT_BRACE("Expected ',' or '}'"),
EXPECTED_COMMA_OR_RIGHT_PAREN("Expected ',' or ')', but got '%s'"),
EXPECTED_COMPOUND_STATEMENT("SyntaxError: expected if, switch, while, do, or for"),
+ EXPECTED_CONSTANT_EXPRESSION("Expected constant expression"),
+ EXPECTED_CONSTANT_EXPRESSION_BOOLEAN("Expected constant expression of type bool, got %s"),
+ EXPECTED_CONSTANT_EXPRESSION_INT("Expected constant expression of type int, got %s"),
+ EXPECTED_CONSTANT_EXPRESSION_NUMBER("Expected constant expression of type num, got %s"),
+ EXPECTED_CONSTANT_EXPRESSION_STRING_NUMBER_BOOL(
+ "Expected constant expression of type String, num or bool, got %s"),
EXPECTED_CONSTANT_LITERAL("Expected a constant literal"),
EXPECTED_EOS("Unexpected token '%s' (expected end of file)"),
EXPECTED_FIELD_NOT_CLASS("%s is a class, expected a local field"),

Powered by Google App Engine
This is Rietveld 408576698