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 | 5 |
6 /** | 6 /** |
7 * The messages in this file should meet the following guide lines: | 7 * The messages in this file should meet the following guide lines: |
8 * | 8 * |
9 * 1. The message should be a complete sentence starting with an uppercase | 9 * 1. The message should be a complete sentence starting with an uppercase |
10 * letter, and ending with a period. | 10 * letter, and ending with a period. |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 EXPONENT_MISSING, | 190 EXPONENT_MISSING, |
191 EXPORT_BEFORE_PARTS, | 191 EXPORT_BEFORE_PARTS, |
192 EXTERNAL_WITH_BODY, | 192 EXTERNAL_WITH_BODY, |
193 EXTRA_CATCH_DECLARATION, | 193 EXTRA_CATCH_DECLARATION, |
194 EXTRA_FORMALS, | 194 EXTRA_FORMALS, |
195 EXTRANEOUS_MODIFIER, | 195 EXTRANEOUS_MODIFIER, |
196 EXTRANEOUS_MODIFIER_REPLACE, | 196 EXTRANEOUS_MODIFIER_REPLACE, |
197 FACTORY_REDIRECTION_IN_NON_FACTORY, | 197 FACTORY_REDIRECTION_IN_NON_FACTORY, |
198 FINAL_FUNCTION_TYPE_PARAMETER, | 198 FINAL_FUNCTION_TYPE_PARAMETER, |
199 FINAL_WITHOUT_INITIALIZER, | 199 FINAL_WITHOUT_INITIALIZER, |
| 200 FORIN_NOT_ASSIGNABLE, |
200 FORMAL_DECLARED_CONST, | 201 FORMAL_DECLARED_CONST, |
201 FORMAL_DECLARED_STATIC, | 202 FORMAL_DECLARED_STATIC, |
202 FUNCTION_TYPE_FORMAL_WITH_DEFAULT, | 203 FUNCTION_TYPE_FORMAL_WITH_DEFAULT, |
203 FUNCTION_WITH_INITIALIZER, | 204 FUNCTION_WITH_INITIALIZER, |
204 GENERIC, | 205 GENERIC, |
205 GETTER_MISMATCH, | 206 GETTER_MISMATCH, |
206 GETTER_NOT_FOUND, | 207 GETTER_NOT_FOUND, |
207 HEX_DIGIT_EXPECTED, | 208 HEX_DIGIT_EXPECTED, |
208 HIDDEN_HINTS, | 209 HIDDEN_HINTS, |
209 HIDDEN_IMPLICIT_IMPORT, | 210 HIDDEN_IMPLICIT_IMPORT, |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 const <MessageKind, MessageTemplate>{ | 486 const <MessageKind, MessageTemplate>{ |
486 /// Do not use this. It is here for legacy and debugging. It violates item | 487 /// Do not use this. It is here for legacy and debugging. It violates item |
487 /// 4 of the guide lines for error messages in the beginning of the file. | 488 /// 4 of the guide lines for error messages in the beginning of the file. |
488 MessageKind.GENERIC: | 489 MessageKind.GENERIC: |
489 const MessageTemplate(MessageKind.GENERIC, '#{text}'), | 490 const MessageTemplate(MessageKind.GENERIC, '#{text}'), |
490 | 491 |
491 MessageKind.NOT_ASSIGNABLE: | 492 MessageKind.NOT_ASSIGNABLE: |
492 const MessageTemplate(MessageKind.NOT_ASSIGNABLE, | 493 const MessageTemplate(MessageKind.NOT_ASSIGNABLE, |
493 "'#{fromType}' is not assignable to '#{toType}'."), | 494 "'#{fromType}' is not assignable to '#{toType}'."), |
494 | 495 |
| 496 MessageKind.FORIN_NOT_ASSIGNABLE: |
| 497 const MessageTemplate(MessageKind.FORIN_NOT_ASSIGNABLE, |
| 498 "The element type '#{currentType}' of '#{expressionType}' " |
| 499 "is not assignable to '#{elementType}'."), |
| 500 |
495 MessageKind.VOID_EXPRESSION: | 501 MessageKind.VOID_EXPRESSION: |
496 const MessageTemplate(MessageKind.VOID_EXPRESSION, | 502 const MessageTemplate(MessageKind.VOID_EXPRESSION, |
497 "Expression does not yield a value."), | 503 "Expression does not yield a value."), |
498 | 504 |
499 MessageKind.VOID_VARIABLE: | 505 MessageKind.VOID_VARIABLE: |
500 const MessageTemplate(MessageKind.VOID_VARIABLE, | 506 const MessageTemplate(MessageKind.VOID_VARIABLE, |
501 "Variable cannot be of type void."), | 507 "Variable cannot be of type void."), |
502 | 508 |
503 MessageKind.RETURN_VALUE_IN_VOID: | 509 MessageKind.RETURN_VALUE_IN_VOID: |
504 const MessageTemplate(MessageKind.RETURN_VALUE_IN_VOID, | 510 const MessageTemplate(MessageKind.RETURN_VALUE_IN_VOID, |
(...skipping 2857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3362 static String convertToString(value) { | 3368 static String convertToString(value) { |
3363 if (value is ErrorToken) { | 3369 if (value is ErrorToken) { |
3364 // Shouldn't happen. | 3370 // Shouldn't happen. |
3365 return value.assertionMessage; | 3371 return value.assertionMessage; |
3366 } else if (value is Token) { | 3372 } else if (value is Token) { |
3367 value = value.value; | 3373 value = value.value; |
3368 } | 3374 } |
3369 return '$value'; | 3375 return '$value'; |
3370 } | 3376 } |
3371 } | 3377 } |
OLD | NEW |