| 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 = "Computer says no!"; | 7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; |
| 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 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2078 static const MessageKind EXPERIMENTAL_ASYNC_AWAIT = const MessageKind( | 2078 static const MessageKind EXPERIMENTAL_ASYNC_AWAIT = const MessageKind( |
| 2079 "Experimental language feature 'async/await' is not supported."); | 2079 "Experimental language feature 'async/await' is not supported."); |
| 2080 | 2080 |
| 2081 static const MessageKind INVALID_STARRED_KEYWORD = const MessageKind( | 2081 static const MessageKind INVALID_STARRED_KEYWORD = const MessageKind( |
| 2082 "Invalid '#{keyword}' keyword.", | 2082 "Invalid '#{keyword}' keyword.", |
| 2083 options: const ['--enable-async'], | 2083 options: const ['--enable-async'], |
| 2084 howToFix: "Try removing whitespace between '#{keyword}' and '*'.", | 2084 howToFix: "Try removing whitespace between '#{keyword}' and '*'.", |
| 2085 examples: const [ | 2085 examples: const [ |
| 2086 "main() async * {}", | 2086 "main() async * {}", |
| 2087 "main() sync * {}", | 2087 "main() sync * {}", |
| 2088 "main() async* { yield * 0; }" | 2088 "main() async* { yield * null; }" |
| 2089 ]); | 2089 ]); |
| 2090 | 2090 |
| 2091 static const MessageKind INVALID_SYNC_MODIFIER = const MessageKind( | 2091 static const MessageKind INVALID_SYNC_MODIFIER = const MessageKind( |
| 2092 "Invalid modifier 'sync'.", | 2092 "Invalid modifier 'sync'.", |
| 2093 options: const ['--enable-async'], | 2093 options: const ['--enable-async'], |
| 2094 howToFix: "Try replacing 'sync' with 'sync*'.", | 2094 howToFix: "Try replacing 'sync' with 'sync*'.", |
| 2095 examples: const [ | 2095 examples: const [ |
| 2096 "main() sync {}" | 2096 "main() sync {}" |
| 2097 ]); | 2097 ]); |
| 2098 | 2098 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2439 static String convertToString(value) { | 2439 static String convertToString(value) { |
| 2440 if (value is ErrorToken) { | 2440 if (value is ErrorToken) { |
| 2441 // Shouldn't happen. | 2441 // Shouldn't happen. |
| 2442 return value.assertionMessage; | 2442 return value.assertionMessage; |
| 2443 } else if (value is Token) { | 2443 } else if (value is Token) { |
| 2444 value = value.value; | 2444 value = value.value; |
| 2445 } | 2445 } |
| 2446 return '$value'; | 2446 return '$value'; |
| 2447 } | 2447 } |
| 2448 } | 2448 } |
| OLD | NEW |