| 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 * The messages in this file should meet the following guide lines: | 6 * The messages in this file should meet the following guide lines: |
| 7 * | 7 * |
| 8 * 1. The message should be a complete sentence starting with an uppercase | 8 * 1. The message should be a complete sentence starting with an uppercase |
| 9 * letter, and ending with a period. | 9 * letter, and ending with a period. |
| 10 * | 10 * |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, | 285 JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, |
| 286 JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER, | 286 JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER, |
| 287 JS_INTEROP_INDEX_NOT_SUPPORTED, | 287 JS_INTEROP_INDEX_NOT_SUPPORTED, |
| 288 JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS, | 288 JS_INTEROP_METHOD_WITH_NAMED_ARGUMENTS, |
| 289 JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS, | 289 JS_OBJECT_LITERAL_CONSTRUCTOR_WITH_POSITIONAL_ARGUMENTS, |
| 290 JS_PLACEHOLDER_CAPTURE, | 290 JS_PLACEHOLDER_CAPTURE, |
| 291 LIBRARY_NAME_MISMATCH, | 291 LIBRARY_NAME_MISMATCH, |
| 292 LIBRARY_NOT_FOUND, | 292 LIBRARY_NOT_FOUND, |
| 293 LIBRARY_NOT_SUPPORTED, | 293 LIBRARY_NOT_SUPPORTED, |
| 294 LIBRARY_TAG_MUST_BE_FIRST, | 294 LIBRARY_TAG_MUST_BE_FIRST, |
| 295 LIBRARY_URI_MISMATCH, | |
| 296 MAIN_HAS_PART_OF, | 295 MAIN_HAS_PART_OF, |
| 297 MAIN_NOT_A_FUNCTION, | 296 MAIN_NOT_A_FUNCTION, |
| 298 MAIN_WITH_EXTRA_PARAMETER, | 297 MAIN_WITH_EXTRA_PARAMETER, |
| 299 MALFORMED_STRING_LITERAL, | 298 MALFORMED_STRING_LITERAL, |
| 300 UNDEFINED_GETTER, | 299 UNDEFINED_GETTER, |
| 301 MEMBER_NOT_STATIC, | 300 MEMBER_NOT_STATIC, |
| 302 MEMBER_USES_CLASS_NAME, | 301 MEMBER_USES_CLASS_NAME, |
| 303 UNDEFINED_METHOD, | 302 UNDEFINED_METHOD, |
| 304 MINUS_OPERATOR_BAD_ARITY, | 303 MINUS_OPERATOR_BAD_ARITY, |
| 305 MIRROR_BLOAT, | 304 MIRROR_BLOAT, |
| (...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2071 part 'part.dart'; | 2070 part 'part.dart'; |
| 2072 | 2071 |
| 2073 main() {} | 2072 main() {} |
| 2074 """, | 2073 """, |
| 2075 'part.dart': """ | 2074 'part.dart': """ |
| 2076 part of lib.bar; | 2075 part of lib.bar; |
| 2077 """ | 2076 """ |
| 2078 } | 2077 } |
| 2079 ]), | 2078 ]), |
| 2080 | 2079 |
| 2081 MessageKind.LIBRARY_URI_MISMATCH: const MessageTemplate( | |
| 2082 MessageKind.LIBRARY_URI_MISMATCH, | |
| 2083 "Expected URI of library '#{libraryUri}'.", | |
| 2084 howToFix: "Try changing the directive to 'part of " | |
| 2085 "\"#{libraryUri}\";'.", | |
| 2086 examples: const [ | |
| 2087 const { | |
| 2088 'main.dart': """ | |
| 2089 library lib.foo; | |
| 2090 | |
| 2091 part 'part.dart'; | |
| 2092 | |
| 2093 main() {} | |
| 2094 """, | |
| 2095 'part.dart': """ | |
| 2096 part of 'not-main.dart'; | |
| 2097 """ | |
| 2098 } | |
| 2099 ]), | |
| 2100 | |
| 2101 MessageKind.MISSING_LIBRARY_NAME: const MessageTemplate( | 2080 MessageKind.MISSING_LIBRARY_NAME: const MessageTemplate( |
| 2102 MessageKind.MISSING_LIBRARY_NAME, | 2081 MessageKind.MISSING_LIBRARY_NAME, |
| 2103 "Library has no name. Part directive expected library name " | 2082 "Library has no name. Part directive expected library name " |
| 2104 "to be '#{libraryName}'.", | 2083 "to be '#{libraryName}'.", |
| 2105 howToFix: "Try adding 'library #{libraryName};' to the library.", | 2084 howToFix: "Try adding 'library #{libraryName};' to the library.", |
| 2106 examples: const [ | 2085 examples: const [ |
| 2107 const { | 2086 const { |
| 2108 'main.dart': """ | 2087 'main.dart': """ |
| 2109 part 'part.dart'; | 2088 part 'part.dart'; |
| 2110 | 2089 |
| (...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3839 static String convertToString(value) { | 3818 static String convertToString(value) { |
| 3840 if (value is ErrorToken) { | 3819 if (value is ErrorToken) { |
| 3841 // Shouldn't happen. | 3820 // Shouldn't happen. |
| 3842 return value.assertionMessage; | 3821 return value.assertionMessage; |
| 3843 } else if (value is Token) { | 3822 } else if (value is Token) { |
| 3844 value = value.value; | 3823 value = value.value; |
| 3845 } | 3824 } |
| 3846 return '$value'; | 3825 return '$value'; |
| 3847 } | 3826 } |
| 3848 } | 3827 } |
| OLD | NEW |