| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 class MessageKind { | 7 class MessageKind { |
| 8 final String template; | 8 final String template; |
| 9 const MessageKind(this.template); | 9 const MessageKind(this.template); |
| 10 | 10 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 251 |
| 252 static const BAD_ARITY_OVERRIDE_CONT = const MessageKind( | 252 static const BAD_ARITY_OVERRIDE_CONT = const MessageKind( |
| 253 "Info: this is the method whose parameters do not match."); | 253 "Info: this is the method whose parameters do not match."); |
| 254 | 254 |
| 255 static const MISSING_FORMALS = const MessageKind( | 255 static const MISSING_FORMALS = const MessageKind( |
| 256 "Error: Formal parameters are missing."); | 256 "Error: Formal parameters are missing."); |
| 257 | 257 |
| 258 static const EXTRA_FORMALS = const MessageKind( | 258 static const EXTRA_FORMALS = const MessageKind( |
| 259 "Error: Formal parameters are not allowed here."); | 259 "Error: Formal parameters are not allowed here."); |
| 260 | 260 |
| 261 static const UNARY_OPERATOR_BAD_ARITY = const MessageKind( |
| 262 "Error: Operator #{1} must take no arguments."); |
| 263 |
| 264 static const MINUS_OPERATOR_BAD_ARITY = const MessageKind( |
| 265 "Error: Operator - must take 0 or 1 arguments."); |
| 266 |
| 267 static const BINARY_OPERATOR_BAD_ARITY = const MessageKind( |
| 268 "Error: Operator #{1} must take 1 argument."); |
| 269 |
| 270 static const TERNARY_OPERATOR_BAD_ARITY = const MessageKind( |
| 271 "Error: Operator #{1} must take 2 arguments."); |
| 272 |
| 273 static const OPERATOR_OPTIONAL_ARGUMENTS = const MessageKind( |
| 274 "Error: Operator #{1} cannot have optional arguments."); |
| 275 |
| 276 static const OPERATOR_NAMED_ARGUMENTS = const MessageKind( |
| 277 "Error: Operator #{1} cannot have named arguments."); |
| 278 |
| 261 // TODO(ahe): This message is hard to localize. This is acceptable, | 279 // TODO(ahe): This message is hard to localize. This is acceptable, |
| 262 // as it will be removed when we ship Dart version 1.0. | 280 // as it will be removed when we ship Dart version 1.0. |
| 263 static const DEPRECATED_FEATURE_WARNING = const MessageKind( | 281 static const DEPRECATED_FEATURE_WARNING = const MessageKind( |
| 264 "Warning: deprecated language feature, #{1}, " | 282 "Warning: deprecated language feature, #{1}, " |
| 265 "will be removed in a future Dart milestone."); | 283 "will be removed in a future Dart milestone."); |
| 266 | 284 |
| 267 // TODO(ahe): This message is hard to localize. This is acceptable, | 285 // TODO(ahe): This message is hard to localize. This is acceptable, |
| 268 // as it will be removed when we ship Dart version 1.0. | 286 // as it will be removed when we ship Dart version 1.0. |
| 269 static const DEPRECATED_FEATURE_ERROR = const MessageKind( | 287 static const DEPRECATED_FEATURE_ERROR = const MessageKind( |
| 270 "Error: #{1} are not legal " | 288 "Error: #{1} are not legal " |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 460 |
| 443 class CompileTimeConstantError extends Diagnostic { | 461 class CompileTimeConstantError extends Diagnostic { |
| 444 CompileTimeConstantError(MessageKind kind, List arguments) | 462 CompileTimeConstantError(MessageKind kind, List arguments) |
| 445 : super(kind, arguments); | 463 : super(kind, arguments); |
| 446 } | 464 } |
| 447 | 465 |
| 448 class CompilationError extends Diagnostic { | 466 class CompilationError extends Diagnostic { |
| 449 CompilationError(MessageKind kind, List arguments) | 467 CompilationError(MessageKind kind, List arguments) |
| 450 : super(kind, arguments); | 468 : super(kind, arguments); |
| 451 } | 469 } |
| OLD | NEW |