| 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 const GENERIC = const MessageKind('#{1}'); | 9 static const GENERIC = const MessageKind('#{1}'); |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 static const EMPTY_CATCH_DECLARATION = const MessageKind( | 109 static const EMPTY_CATCH_DECLARATION = const MessageKind( |
| 110 'expected an identifier in catch declaration'); | 110 'expected an identifier in catch declaration'); |
| 111 static const EXTRA_CATCH_DECLARATION = const MessageKind( | 111 static const EXTRA_CATCH_DECLARATION = const MessageKind( |
| 112 'extra parameter in catch declaration'); | 112 'extra parameter in catch declaration'); |
| 113 static const PARAMETER_WITH_TYPE_IN_CATCH = const MessageKind( | 113 static const PARAMETER_WITH_TYPE_IN_CATCH = const MessageKind( |
| 114 'cannot use type annotations in catch'); | 114 'cannot use type annotations in catch'); |
| 115 static const PARAMETER_WITH_MODIFIER_IN_CATCH = const MessageKind( | 115 static const PARAMETER_WITH_MODIFIER_IN_CATCH = const MessageKind( |
| 116 'cannot use modifiers in catch'); | 116 'cannot use modifiers in catch'); |
| 117 static const OPTIONAL_PARAMETER_IN_CATCH = const MessageKind( | 117 static const OPTIONAL_PARAMETER_IN_CATCH = const MessageKind( |
| 118 'cannot use optional parameters in catch'); | 118 'cannot use optional parameters in catch'); |
| 119 static const THROW_WITHOUT_EXPRESSION = const MessageKind( |
| 120 'cannot use re-throw outside of catch block (expression expected after ' |
| 121 '"throw")'); |
| 119 static const UNBOUND_LABEL = const MessageKind( | 122 static const UNBOUND_LABEL = const MessageKind( |
| 120 'cannot resolve label #{1}'); | 123 'cannot resolve label #{1}'); |
| 121 static const NO_BREAK_TARGET = const MessageKind( | 124 static const NO_BREAK_TARGET = const MessageKind( |
| 122 'break statement not inside switch or loop'); | 125 'break statement not inside switch or loop'); |
| 123 static const NO_CONTINUE_TARGET = const MessageKind( | 126 static const NO_CONTINUE_TARGET = const MessageKind( |
| 124 'continue statement not inside loop'); | 127 'continue statement not inside loop'); |
| 125 static const EXISTING_LABEL = const MessageKind( | 128 static const EXISTING_LABEL = const MessageKind( |
| 126 'original declaration of duplicate label #{1}'); | 129 'original declaration of duplicate label #{1}'); |
| 127 static const DUPLICATE_LABEL = const MessageKind( | 130 static const DUPLICATE_LABEL = const MessageKind( |
| 128 'duplicate declaration of label #{1}'); | 131 'duplicate declaration of label #{1}'); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 | 354 |
| 352 class CompileTimeConstantError extends Diagnostic { | 355 class CompileTimeConstantError extends Diagnostic { |
| 353 CompileTimeConstantError(MessageKind kind, List arguments) | 356 CompileTimeConstantError(MessageKind kind, List arguments) |
| 354 : super(kind, arguments); | 357 : super(kind, arguments); |
| 355 } | 358 } |
| 356 | 359 |
| 357 class CompilationError extends Diagnostic { | 360 class CompilationError extends Diagnostic { |
| 358 CompilationError(MessageKind kind, List arguments) | 361 CompilationError(MessageKind kind, List arguments) |
| 359 : super(kind, arguments); | 362 : super(kind, arguments); |
| 360 } | 363 } |
| OLD | NEW |