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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 INVALID_PACKAGE_URI, | 263 INVALID_PACKAGE_URI, |
264 INVALID_PARAMETER, | 264 INVALID_PARAMETER, |
265 INVALID_RECEIVER_IN_INITIALIZER, | 265 INVALID_RECEIVER_IN_INITIALIZER, |
266 INVALID_SOURCE_FILE_LOCATION, | 266 INVALID_SOURCE_FILE_LOCATION, |
267 INVALID_SYMBOL, | 267 INVALID_SYMBOL, |
268 INVALID_SYNC_MODIFIER, | 268 INVALID_SYNC_MODIFIER, |
269 INVALID_TYPE_VARIABLE_BOUND, | 269 INVALID_TYPE_VARIABLE_BOUND, |
270 INVALID_UNNAMED_CONSTRUCTOR_NAME, | 270 INVALID_UNNAMED_CONSTRUCTOR_NAME, |
271 INVALID_URI, | 271 INVALID_URI, |
272 INVALID_USE_OF_SUPER, | 272 INVALID_USE_OF_SUPER, |
| 273 JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, |
| 274 JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER, |
273 LIBRARY_NAME_MISMATCH, | 275 LIBRARY_NAME_MISMATCH, |
274 LIBRARY_NOT_FOUND, | 276 LIBRARY_NOT_FOUND, |
275 LIBRARY_TAG_MUST_BE_FIRST, | 277 LIBRARY_TAG_MUST_BE_FIRST, |
276 MAIN_NOT_A_FUNCTION, | 278 MAIN_NOT_A_FUNCTION, |
277 MAIN_WITH_EXTRA_PARAMETER, | 279 MAIN_WITH_EXTRA_PARAMETER, |
278 MALFORMED_STRING_LITERAL, | 280 MALFORMED_STRING_LITERAL, |
279 MEMBER_NOT_FOUND, | 281 MEMBER_NOT_FOUND, |
280 MEMBER_NOT_STATIC, | 282 MEMBER_NOT_STATIC, |
281 MEMBER_USES_CLASS_NAME, | 283 MEMBER_USES_CLASS_NAME, |
282 METHOD_NOT_FOUND, | 284 METHOD_NOT_FOUND, |
(...skipping 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 | 2078 |
2077 MessageKind.INTERNAL_LIBRARY_FROM: | 2079 MessageKind.INTERNAL_LIBRARY_FROM: |
2078 const MessageTemplate(MessageKind.INTERNAL_LIBRARY_FROM, | 2080 const MessageTemplate(MessageKind.INTERNAL_LIBRARY_FROM, |
2079 "Internal library '#{resolvedUri}' is not accessible from " | 2081 "Internal library '#{resolvedUri}' is not accessible from " |
2080 "'#{importingUri}'."), | 2082 "'#{importingUri}'."), |
2081 | 2083 |
2082 MessageKind.INTERNAL_LIBRARY: | 2084 MessageKind.INTERNAL_LIBRARY: |
2083 const MessageTemplate(MessageKind.INTERNAL_LIBRARY, | 2085 const MessageTemplate(MessageKind.INTERNAL_LIBRARY, |
2084 "Internal library '#{resolvedUri}' is not accessible."), | 2086 "Internal library '#{resolvedUri}' is not accessible."), |
2085 | 2087 |
| 2088 MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS: |
| 2089 const MessageTemplate( |
| 2090 MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, |
| 2091 "#{cls} cannot extend a normal Dart class as it is annoted with" |
| 2092 "@Js.", |
| 2093 howToFix: "Add @Js annotation to super class", |
| 2094 examples: const [ |
| 2095 """ |
| 2096 class Foo { } |
| 2097 |
| 2098 @Js() |
| 2099 class Bar extends Foo { } |
| 2100 """]), |
| 2101 |
| 2102 MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER: |
| 2103 const MessageTemplate( |
| 2104 MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER, |
| 2105 "Js interop class #{cls} member #{member} is not external.", |
| 2106 howToFix: "Mark all interop methods external", |
| 2107 examples: const [ |
| 2108 """ |
| 2109 @Js |
| 2110 class Foo { |
| 2111 external bar(); |
| 2112 } |
| 2113 """]), |
| 2114 |
2086 MessageKind.LIBRARY_NOT_FOUND: | 2115 MessageKind.LIBRARY_NOT_FOUND: |
2087 const MessageTemplate(MessageKind.LIBRARY_NOT_FOUND, | 2116 const MessageTemplate(MessageKind.LIBRARY_NOT_FOUND, |
2088 "Library not found '#{resolvedUri}'."), | 2117 "Library not found '#{resolvedUri}'."), |
2089 | 2118 |
2090 MessageKind.UNSUPPORTED_EQ_EQ_EQ: | 2119 MessageKind.UNSUPPORTED_EQ_EQ_EQ: |
2091 const MessageTemplate(MessageKind.UNSUPPORTED_EQ_EQ_EQ, | 2120 const MessageTemplate(MessageKind.UNSUPPORTED_EQ_EQ_EQ, |
2092 "'===' is not an operator. " | 2121 "'===' is not an operator. " |
2093 "Did you mean '#{lhs} == #{rhs}' or 'identical(#{lhs}, #{rhs})'?"), | 2122 "Did you mean '#{lhs} == #{rhs}' or 'identical(#{lhs}, #{rhs})'?"), |
2094 | 2123 |
2095 MessageKind.UNSUPPORTED_BANG_EQ_EQ: | 2124 MessageKind.UNSUPPORTED_BANG_EQ_EQ: |
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3357 static String convertToString(value) { | 3386 static String convertToString(value) { |
3358 if (value is ErrorToken) { | 3387 if (value is ErrorToken) { |
3359 // Shouldn't happen. | 3388 // Shouldn't happen. |
3360 return value.assertionMessage; | 3389 return value.assertionMessage; |
3361 } else if (value is Token) { | 3390 } else if (value is Token) { |
3362 value = value.value; | 3391 value = value.value; |
3363 } | 3392 } |
3364 return '$value'; | 3393 return '$value'; |
3365 } | 3394 } |
3366 } | 3395 } |
OLD | NEW |