Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 class MessageKind { | 5 class MessageKind { |
| 6 final String template; | 6 final String template; |
| 7 const MessageKind(this.template); | 7 const MessageKind(this.template); |
| 8 | 8 |
| 9 static final GENERIC = const MessageKind('#{1}'); | 9 static final GENERIC = const MessageKind('#{1}'); |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 static final NOT_A_FIELD = const MessageKind( | 71 static final NOT_A_FIELD = const MessageKind( |
| 72 '#{1} is not a field'); | 72 '#{1} is not a field'); |
| 73 static final CONSTRUCTOR_CALL_EXPECTED = const MessageKind( | 73 static final CONSTRUCTOR_CALL_EXPECTED = const MessageKind( |
| 74 "only call to 'this' or 'super' constructor allowed"); | 74 "only call to 'this' or 'super' constructor allowed"); |
| 75 static final INVALID_FOR_IN = const MessageKind( | 75 static final INVALID_FOR_IN = const MessageKind( |
| 76 'invalid for-in variable declaration.'); | 76 'invalid for-in variable declaration.'); |
| 77 static final INVALID_INITIALIZER = const MessageKind( | 77 static final INVALID_INITIALIZER = const MessageKind( |
| 78 'invalid initializer'); | 78 'invalid initializer'); |
| 79 static final FUNCTION_WITH_INITIALIZER = const MessageKind( | 79 static final FUNCTION_WITH_INITIALIZER = const MessageKind( |
| 80 'only constructors can have initializers'); | 80 'only constructors can have initializers'); |
| 81 | |
|
ahe
2012/08/25 04:37:19
extra line
| |
| 81 static final REDIRECTING_CONSTRUCTOR_CYCLE = const MessageKind( | 82 static final REDIRECTING_CONSTRUCTOR_CYCLE = const MessageKind( |
| 82 'cyclic constructor redirection'); | 83 'cyclic constructor redirection'); |
| 83 static final REDIRECTING_CONSTRUCTOR_HAS_BODY = const MessageKind( | 84 static final REDIRECTING_CONSTRUCTOR_HAS_BODY = const MessageKind( |
| 84 'redirecting constructor cannot have a body'); | 85 'redirecting constructor cannot have a body'); |
| 85 static final REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER = const MessageKind( | 86 static final REDIRECTING_CONSTRUCTOR_HAS_INITIALIZER = const MessageKind( |
| 86 'redirecting constructor cannot have other initializers'); | 87 'redirecting constructor cannot have other initializers'); |
| 87 static final SUPER_INITIALIZER_IN_OBJECT = const MessageKind( | 88 static final SUPER_INITIALIZER_IN_OBJECT = const MessageKind( |
| 88 "'Object' cannot have a super initializer"); | 89 "'Object' cannot have a super initializer"); |
| 89 static final DUPLICATE_SUPER_INITIALIZER = const MessageKind( | 90 static final DUPLICATE_SUPER_INITIALIZER = const MessageKind( |
| 90 'cannot have more than one super initializer'); | 91 'cannot have more than one super initializer'); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 static final CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT = const MessageKind( | 207 static final CANNOT_OVERRIDE_METHOD_WITH_FIELD_CONT = const MessageKind( |
| 207 "Info: this is the method that cannot be overridden by a field."); | 208 "Info: this is the method that cannot be overridden by a field."); |
| 208 | 209 |
| 209 static final BAD_ARITY_OVERRIDE = const MessageKind( | 210 static final BAD_ARITY_OVERRIDE = const MessageKind( |
| 210 "Error: cannot override method '#{1}' in '#{2}'; " | 211 "Error: cannot override method '#{1}' in '#{2}'; " |
| 211 "the parameters do not match."); | 212 "the parameters do not match."); |
| 212 | 213 |
| 213 static final BAD_ARITY_OVERRIDE_CONT = const MessageKind( | 214 static final BAD_ARITY_OVERRIDE_CONT = const MessageKind( |
| 214 "Info: this is the method whose parameters do not match."); | 215 "Info: this is the method whose parameters do not match."); |
| 215 | 216 |
| 217 static final CONSTRUCTOR_WITH_RETURN_TYPE = const MessageKind( | |
| 218 "Error: cannot have return type for constructor."); | |
| 219 | |
| 220 static final ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( | |
| 221 "Error: cannot have final modifier on method."); | |
| 222 | |
| 223 static final ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( | |
| 224 "Error: illegal constructor modifiers: #{1}."); | |
| 225 | |
| 216 static final COMPILER_CRASHED = const MessageKind( | 226 static final COMPILER_CRASHED = const MessageKind( |
| 217 "Error: The compiler crashed when compiling this element."); | 227 "Error: The compiler crashed when compiling this element."); |
| 218 | 228 |
| 219 static final PLEASE_REPORT_THE_CRASH = const MessageKind(''' | 229 static final PLEASE_REPORT_THE_CRASH = const MessageKind(''' |
| 220 The compiler is broken. | 230 The compiler is broken. |
| 221 | 231 |
| 222 When compiling the above element, the compiler crashed. It is not | 232 When compiling the above element, the compiler crashed. It is not |
| 223 possible to tell if this is caused by a problem in your program or | 233 possible to tell if this is caused by a problem in your program or |
| 224 not. Regardless, the compiler should not crash. | 234 not. Regardless, the compiler should not crash. |
| 225 | 235 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 | 313 |
| 304 class CompileTimeConstantError extends Diagnostic { | 314 class CompileTimeConstantError extends Diagnostic { |
| 305 CompileTimeConstantError(MessageKind kind, List<Type> arguments) | 315 CompileTimeConstantError(MessageKind kind, List<Type> arguments) |
| 306 : super(kind, arguments); | 316 : super(kind, arguments); |
| 307 } | 317 } |
| 308 | 318 |
| 309 class CompilationError extends Diagnostic { | 319 class CompilationError extends Diagnostic { |
| 310 CompilationError(MessageKind kind, List<Type> arguments) | 320 CompilationError(MessageKind kind, List<Type> arguments) |
| 311 : super(kind, arguments); | 321 : super(kind, arguments); |
| 312 } | 322 } |
| OLD | NEW |