| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 '#{1} is a #{2}, not a constructor'); | 96 '#{1} is a #{2}, not a constructor'); |
| 97 static const FIELD_PARAMETER_NOT_ALLOWED = const MessageKind( | 97 static const FIELD_PARAMETER_NOT_ALLOWED = const MessageKind( |
| 98 'a field parameter is only allowed in generative constructors'); | 98 'a field parameter is only allowed in generative constructors'); |
| 99 static const INVALID_PARAMETER = const MessageKind( | 99 static const INVALID_PARAMETER = const MessageKind( |
| 100 "cannot resolve parameter"); | 100 "cannot resolve parameter"); |
| 101 static const NOT_INSTANCE_FIELD = const MessageKind( | 101 static const NOT_INSTANCE_FIELD = const MessageKind( |
| 102 '#{1} is not an instance field'); | 102 '#{1} is not an instance field'); |
| 103 static const NO_CATCH_NOR_FINALLY = const MessageKind( | 103 static const NO_CATCH_NOR_FINALLY = const MessageKind( |
| 104 "expected 'catch' or 'finally'"); | 104 "expected 'catch' or 'finally'"); |
| 105 static const EMPTY_CATCH_DECLARATION = const MessageKind( | 105 static const EMPTY_CATCH_DECLARATION = const MessageKind( |
| 106 'expected a variable in catch declaration'); | 106 'expected an identifier in catch declaration'); |
| 107 static const EXTRA_CATCH_DECLARATION = const MessageKind( | 107 static const EXTRA_CATCH_DECLARATION = const MessageKind( |
| 108 'extra variable in catch declaration'); | 108 'extra parameter in catch declaration'); |
| 109 static const PARAMETER_WITH_TYPE_IN_CATCH = const MessageKind( |
| 110 'cannot use type annotations in catch'); |
| 111 static const PARAMETER_WITH_MODIFIER_IN_CATCH = const MessageKind( |
| 112 'cannot use modifiers in catch'); |
| 113 static const OPTIONAL_PARAMETER_IN_CATCH = const MessageKind( |
| 114 'cannot use optional parameters in catch'); |
| 109 static const UNBOUND_LABEL = const MessageKind( | 115 static const UNBOUND_LABEL = const MessageKind( |
| 110 'cannot resolve label #{1}'); | 116 'cannot resolve label #{1}'); |
| 111 static const NO_BREAK_TARGET = const MessageKind( | 117 static const NO_BREAK_TARGET = const MessageKind( |
| 112 'break statement not inside switch or loop'); | 118 'break statement not inside switch or loop'); |
| 113 static const NO_CONTINUE_TARGET = const MessageKind( | 119 static const NO_CONTINUE_TARGET = const MessageKind( |
| 114 'continue statement not inside loop'); | 120 'continue statement not inside loop'); |
| 115 static const EXISTING_LABEL = const MessageKind( | 121 static const EXISTING_LABEL = const MessageKind( |
| 116 'original declaration of duplicate label #{1}'); | 122 'original declaration of duplicate label #{1}'); |
| 117 static const DUPLICATE_LABEL = const MessageKind( | 123 static const DUPLICATE_LABEL = const MessageKind( |
| 118 'duplicate declaration of label #{1}'); | 124 'duplicate declaration of label #{1}'); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 | 328 |
| 323 class CompileTimeConstantError extends Diagnostic { | 329 class CompileTimeConstantError extends Diagnostic { |
| 324 CompileTimeConstantError(MessageKind kind, List arguments) | 330 CompileTimeConstantError(MessageKind kind, List arguments) |
| 325 : super(kind, arguments); | 331 : super(kind, arguments); |
| 326 } | 332 } |
| 327 | 333 |
| 328 class CompilationError extends Diagnostic { | 334 class CompilationError extends Diagnostic { |
| 329 CompilationError(MessageKind kind, List arguments) | 335 CompilationError(MessageKind kind, List arguments) |
| 330 : super(kind, arguments); | 336 : super(kind, arguments); |
| 331 } | 337 } |
| OLD | NEW |