| 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 const DONT_KNOW_HOW_TO_FIX = ""; | 7 const DONT_KNOW_HOW_TO_FIX = ""; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * The messages in this file should meet the following guide lines: | 10 * The messages in this file should meet the following guide lines: |
| (...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1470 static const MessageKind WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT = | 1470 static const MessageKind WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT = |
| 1471 const MessageKind( | 1471 const MessageKind( |
| 1472 "Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant."); | 1472 "Argument for 'JS_INTERCEPTOR_CONSTANT' must be a type constant."); |
| 1473 | 1473 |
| 1474 static const MessageKind EXPECTED_IDENTIFIER_NOT_RESERVED_WORD = | 1474 static const MessageKind EXPECTED_IDENTIFIER_NOT_RESERVED_WORD = |
| 1475 const MessageKind( | 1475 const MessageKind( |
| 1476 "'#{keyword}' is a reserved word and can't be used here.", | 1476 "'#{keyword}' is a reserved word and can't be used here.", |
| 1477 howToFix: "Try using a different name.", | 1477 howToFix: "Try using a different name.", |
| 1478 examples: const ["do() {} main() {}"]); | 1478 examples: const ["do() {} main() {}"]); |
| 1479 | 1479 |
| 1480 static const MessageKind NAMED_FUNCTION_EXPRESSION = |
| 1481 const MessageKind("Function expression '#{name}' cannot be named.", |
| 1482 howToFix: "Try removing the name.", |
| 1483 examples: const ["main() { var f = func() {}; }"]); |
| 1484 |
| 1480 static const MessageKind UNUSED_METHOD = const MessageKind( | 1485 static const MessageKind UNUSED_METHOD = const MessageKind( |
| 1481 "The method '#{name}' is never called.", | 1486 "The method '#{name}' is never called.", |
| 1482 howToFix: "Consider deleting it.", | 1487 howToFix: "Consider deleting it.", |
| 1483 examples: const ["deadCode() {} main() {}"]); | 1488 examples: const ["deadCode() {} main() {}"]); |
| 1484 | 1489 |
| 1485 static const MessageKind UNUSED_CLASS = const MessageKind( | 1490 static const MessageKind UNUSED_CLASS = const MessageKind( |
| 1486 "The class '#{name}' is never used.", | 1491 "The class '#{name}' is never used.", |
| 1487 howToFix: "Consider deleting it.", | 1492 howToFix: "Consider deleting it.", |
| 1488 examples: const ["class DeadCode {} main() {}"]); | 1493 examples: const ["class DeadCode {} main() {}"]); |
| 1489 | 1494 |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2107 static String convertToString(value) { | 2112 static String convertToString(value) { |
| 2108 if (value is ErrorToken) { | 2113 if (value is ErrorToken) { |
| 2109 // Shouldn't happen. | 2114 // Shouldn't happen. |
| 2110 return value.assertionMessage; | 2115 return value.assertionMessage; |
| 2111 } else if (value is Token) { | 2116 } else if (value is Token) { |
| 2112 value = value.value; | 2117 value = value.value; |
| 2113 } | 2118 } |
| 2114 return '$value'; | 2119 return '$value'; |
| 2115 } | 2120 } |
| 2116 } | 2121 } |
| OLD | NEW |