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 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2074 }""", | 2074 }""", |
2075 """ | 2075 """ |
2076 main() async* { | 2076 main() async* { |
2077 var yield; | 2077 var yield; |
2078 }""", | 2078 }""", |
2079 """ | 2079 """ |
2080 main() sync* { | 2080 main() sync* { |
2081 var yield; | 2081 var yield; |
2082 }"""]); | 2082 }"""]); |
2083 | 2083 |
| 2084 static const MessageKind NATIVE_NOT_SUPPORTED = const MessageKind( |
| 2085 "'native' modifier is not supported.", |
| 2086 howToFix: "Try removing the 'native' implementation or analyzing the " |
| 2087 "code with the --allow-native-extensions option.", |
| 2088 examples: const [""" |
| 2089 main() native "Main"; |
| 2090 """]); |
| 2091 |
| 2092 static const MessageKind DART_EXT_NOT_SUPPORTED = const MessageKind( |
| 2093 "The 'dart-ext' scheme is not supported.", |
| 2094 howToFix: "Try analyzing the code with the --allow-native-extensions " |
| 2095 "option.", |
| 2096 examples: const [""" |
| 2097 import 'dart-ext:main'; |
| 2098 |
| 2099 main() {} |
| 2100 """]); |
| 2101 |
2084 ////////////////////////////////////////////////////////////////////////////// | 2102 ////////////////////////////////////////////////////////////////////////////// |
2085 // Patch errors start. | 2103 // Patch errors start. |
2086 ////////////////////////////////////////////////////////////////////////////// | 2104 ////////////////////////////////////////////////////////////////////////////// |
2087 | 2105 |
2088 static const MessageKind PATCH_RETURN_TYPE_MISMATCH = const MessageKind( | 2106 static const MessageKind PATCH_RETURN_TYPE_MISMATCH = const MessageKind( |
2089 "Patch return type '#{patchReturnType}' does not match " | 2107 "Patch return type '#{patchReturnType}' does not match " |
2090 "'#{originReturnType}' on origin method '#{methodName}'."); | 2108 "'#{originReturnType}' on origin method '#{methodName}'."); |
2091 | 2109 |
2092 static const MessageKind PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH = | 2110 static const MessageKind PATCH_REQUIRED_PARAMETER_COUNT_MISMATCH = |
2093 const MessageKind( | 2111 const MessageKind( |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2234 static String convertToString(value) { | 2252 static String convertToString(value) { |
2235 if (value is ErrorToken) { | 2253 if (value is ErrorToken) { |
2236 // Shouldn't happen. | 2254 // Shouldn't happen. |
2237 return value.assertionMessage; | 2255 return value.assertionMessage; |
2238 } else if (value is Token) { | 2256 } else if (value is Token) { |
2239 value = value.value; | 2257 value = value.value; |
2240 } | 2258 } |
2241 return '$value'; | 2259 return '$value'; |
2242 } | 2260 } |
2243 } | 2261 } |
OLD | NEW |