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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
268 INVALID_PACKAGE_URI, | 268 INVALID_PACKAGE_URI, |
269 INVALID_PARAMETER, | 269 INVALID_PARAMETER, |
270 INVALID_RECEIVER_IN_INITIALIZER, | 270 INVALID_RECEIVER_IN_INITIALIZER, |
271 INVALID_SOURCE_FILE_LOCATION, | 271 INVALID_SOURCE_FILE_LOCATION, |
272 INVALID_SYMBOL, | 272 INVALID_SYMBOL, |
273 INVALID_SYNC_MODIFIER, | 273 INVALID_SYNC_MODIFIER, |
274 INVALID_TYPE_VARIABLE_BOUND, | 274 INVALID_TYPE_VARIABLE_BOUND, |
275 INVALID_UNNAMED_CONSTRUCTOR_NAME, | 275 INVALID_UNNAMED_CONSTRUCTOR_NAME, |
276 INVALID_URI, | 276 INVALID_URI, |
277 INVALID_USE_OF_SUPER, | 277 INVALID_USE_OF_SUPER, |
278 JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, | |
279 JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER, | |
278 LIBRARY_NAME_MISMATCH, | 280 LIBRARY_NAME_MISMATCH, |
279 LIBRARY_NOT_FOUND, | 281 LIBRARY_NOT_FOUND, |
280 LIBRARY_NOT_SUPPORTED, | 282 LIBRARY_NOT_SUPPORTED, |
281 LIBRARY_TAG_MUST_BE_FIRST, | 283 LIBRARY_TAG_MUST_BE_FIRST, |
282 MAIN_NOT_A_FUNCTION, | 284 MAIN_NOT_A_FUNCTION, |
283 MAIN_WITH_EXTRA_PARAMETER, | 285 MAIN_WITH_EXTRA_PARAMETER, |
284 MALFORMED_STRING_LITERAL, | 286 MALFORMED_STRING_LITERAL, |
285 MEMBER_NOT_FOUND, | 287 MEMBER_NOT_FOUND, |
286 MEMBER_NOT_STATIC, | 288 MEMBER_NOT_STATIC, |
287 MEMBER_USES_CLASS_NAME, | 289 MEMBER_USES_CLASS_NAME, |
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2123 | 2125 |
2124 MessageKind.INTERNAL_LIBRARY_FROM: | 2126 MessageKind.INTERNAL_LIBRARY_FROM: |
2125 const MessageTemplate(MessageKind.INTERNAL_LIBRARY_FROM, | 2127 const MessageTemplate(MessageKind.INTERNAL_LIBRARY_FROM, |
2126 "Internal library '#{resolvedUri}' is not accessible from " | 2128 "Internal library '#{resolvedUri}' is not accessible from " |
2127 "'#{importingUri}'."), | 2129 "'#{importingUri}'."), |
2128 | 2130 |
2129 MessageKind.INTERNAL_LIBRARY: | 2131 MessageKind.INTERNAL_LIBRARY: |
2130 const MessageTemplate(MessageKind.INTERNAL_LIBRARY, | 2132 const MessageTemplate(MessageKind.INTERNAL_LIBRARY, |
2131 "Internal library '#{resolvedUri}' is not accessible."), | 2133 "Internal library '#{resolvedUri}' is not accessible."), |
2132 | 2134 |
2135 MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS: | |
2136 const MessageTemplate( | |
2137 MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, | |
2138 "Js-interop class '#{cls}' cannot extend from the non js-interop " | |
2139 "class #{superclass}.", | |
Siggi Cherem (dart-lang)
2015/10/13 02:08:53
nit: add missing ' ' around #{superclass}
Jacob
2015/10/13 03:10:42
Done.
| |
2140 howToFix: "Annotate the superclass with @Js.", | |
2141 examples: const [ | |
2142 """ | |
2143 import 'package:js/js.dart'; | |
2144 | |
2145 class Foo { } | |
2146 | |
2147 @Js() | |
2148 class Bar extends Foo { } | |
2149 | |
2150 main() { | |
2151 new Bar(); | |
2152 } | |
2153 """]), | |
2154 | |
2155 MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER: | |
2156 const MessageTemplate( | |
2157 MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER, | |
2158 "Member '#{member}' in js-interop class '#{cls}' is not external.", | |
2159 howToFix: "Mark all interop methods external", | |
2160 examples: const [ | |
2161 """ | |
2162 import 'package:js/js.dart'; | |
2163 | |
2164 @Js() | |
2165 class Foo { | |
2166 bar() {} | |
2167 } | |
2168 | |
2169 main() { | |
2170 new Foo().bar(); | |
2171 } | |
2172 """]), | |
2173 | |
2133 MessageKind.LIBRARY_NOT_FOUND: | 2174 MessageKind.LIBRARY_NOT_FOUND: |
2134 const MessageTemplate(MessageKind.LIBRARY_NOT_FOUND, | 2175 const MessageTemplate(MessageKind.LIBRARY_NOT_FOUND, |
2135 "Library not found '#{resolvedUri}'."), | 2176 "Library not found '#{resolvedUri}'."), |
2136 | 2177 |
2137 MessageKind.LIBRARY_NOT_SUPPORTED: | 2178 MessageKind.LIBRARY_NOT_SUPPORTED: |
2138 const MessageTemplate(MessageKind.LIBRARY_NOT_SUPPORTED, | 2179 const MessageTemplate(MessageKind.LIBRARY_NOT_SUPPORTED, |
2139 "Library not supported '#{resolvedUri}'.", | 2180 "Library not supported '#{resolvedUri}'.", |
2140 howToFix: "Try removing the dependency or enabling support using " | 2181 howToFix: "Try removing the dependency or enabling support using " |
2141 "the '--categories' option.", | 2182 "the '--categories' option.", |
2142 examples: const [/* | 2183 examples: const [/* |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3461 static String convertToString(value) { | 3502 static String convertToString(value) { |
3462 if (value is ErrorToken) { | 3503 if (value is ErrorToken) { |
3463 // Shouldn't happen. | 3504 // Shouldn't happen. |
3464 return value.assertionMessage; | 3505 return value.assertionMessage; |
3465 } else if (value is Token) { | 3506 } else if (value is Token) { |
3466 value = value.value; | 3507 value = value.value; |
3467 } | 3508 } |
3468 return '$value'; | 3509 return '$value'; |
3469 } | 3510 } |
3470 } | 3511 } |
OLD | NEW |