| 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 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2130 | 2130 |
| 2131 MessageKind.INTERNAL_LIBRARY: | 2131 MessageKind.INTERNAL_LIBRARY: |
| 2132 const MessageTemplate(MessageKind.INTERNAL_LIBRARY, | 2132 const MessageTemplate(MessageKind.INTERNAL_LIBRARY, |
| 2133 "Internal library '#{resolvedUri}' is not accessible."), | 2133 "Internal library '#{resolvedUri}' is not accessible."), |
| 2134 | 2134 |
| 2135 MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS: | 2135 MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS: |
| 2136 const MessageTemplate( | 2136 const MessageTemplate( |
| 2137 MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, | 2137 MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, |
| 2138 "Js-interop class '#{cls}' cannot extend from the non js-interop " | 2138 "Js-interop class '#{cls}' cannot extend from the non js-interop " |
| 2139 "class '#{superclass}'.", | 2139 "class '#{superclass}'.", |
| 2140 howToFix: "Annotate the superclass with @Js.", | 2140 howToFix: "Annotate the superclass with @JS.", |
| 2141 examples: const [ | 2141 examples: const [ |
| 2142 """ | 2142 """ |
| 2143 import 'package:js/js.dart'; | 2143 import 'package:js/js.dart'; |
| 2144 | 2144 |
| 2145 class Foo { } | 2145 class Foo { } |
| 2146 | 2146 |
| 2147 @Js() | 2147 @JS() |
| 2148 class Bar extends Foo { } | 2148 class Bar extends Foo { } |
| 2149 | 2149 |
| 2150 main() { | 2150 main() { |
| 2151 new Bar(); | 2151 new Bar(); |
| 2152 } | 2152 } |
| 2153 """]), | 2153 """]), |
| 2154 | 2154 |
| 2155 MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER: | 2155 MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER: |
| 2156 const MessageTemplate( | 2156 const MessageTemplate( |
| 2157 MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER, | 2157 MessageKind.JS_INTEROP_CLASS_NON_EXTERNAL_MEMBER, |
| 2158 "Member '#{member}' in js-interop class '#{cls}' is not external.", | 2158 "Member '#{member}' in js-interop class '#{cls}' is not external.", |
| 2159 howToFix: "Mark all interop methods external", | 2159 howToFix: "Mark all interop methods external", |
| 2160 examples: const [ | 2160 examples: const [ |
| 2161 """ | 2161 """ |
| 2162 import 'package:js/js.dart'; | 2162 import 'package:js/js.dart'; |
| 2163 | 2163 |
| 2164 @Js() | 2164 @JS() |
| 2165 class Foo { | 2165 class Foo { |
| 2166 bar() {} | 2166 bar() {} |
| 2167 } | 2167 } |
| 2168 | 2168 |
| 2169 main() { | 2169 main() { |
| 2170 new Foo().bar(); | 2170 new Foo().bar(); |
| 2171 } | 2171 } |
| 2172 """]), | 2172 """]), |
| 2173 | 2173 |
| 2174 MessageKind.LIBRARY_NOT_FOUND: | 2174 MessageKind.LIBRARY_NOT_FOUND: |
| (...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3502 static String convertToString(value) { | 3502 static String convertToString(value) { |
| 3503 if (value is ErrorToken) { | 3503 if (value is ErrorToken) { |
| 3504 // Shouldn't happen. | 3504 // Shouldn't happen. |
| 3505 return value.assertionMessage; | 3505 return value.assertionMessage; |
| 3506 } else if (value is Token) { | 3506 } else if (value is Token) { |
| 3507 value = value.value; | 3507 value = value.value; |
| 3508 } | 3508 } |
| 3509 return '$value'; | 3509 return '$value'; |
| 3510 } | 3510 } |
| 3511 } | 3511 } |
| OLD | NEW |