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 * The messages in this file should meet the following guide lines: | 6 * The messages in this file should meet the following guide lines: |
7 * | 7 * |
8 * 1. The message should be a complete sentence starting with an uppercase | 8 * 1. The message should be a complete sentence starting with an uppercase |
9 * letter, and ending with a period. | 9 * letter, and ending with a period. |
10 * | 10 * |
(...skipping 3222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3233 howToFix: "Try rewriting the loop as a for-in loop or removing the " | 3233 howToFix: "Try rewriting the loop as a for-in loop or removing the " |
3234 "'await' keyword.", | 3234 "'await' keyword.", |
3235 examples: const [ | 3235 examples: const [ |
3236 """ | 3236 """ |
3237 main() async* { | 3237 main() async* { |
3238 await for (int i = 0; i < 10; i++) {} | 3238 await for (int i = 0; i < 10; i++) {} |
3239 } | 3239 } |
3240 """ | 3240 """ |
3241 ]), | 3241 ]), |
3242 | 3242 |
3243 MessageKind.ASYNC_AWAIT_NOT_SUPPORTED: | 3243 MessageKind.ASYNC_AWAIT_NOT_SUPPORTED: const MessageTemplate( |
3244 const MessageTemplate(MessageKind.ASYNC_AWAIT_NOT_SUPPORTED, | 3244 MessageKind.ASYNC_AWAIT_NOT_SUPPORTED, |
3245 "The async/sync* syntax is not supported on the current platform."), | 3245 "The async/sync* syntax is not supported on the current platform."), |
3246 | |
3247 | 3246 |
3248 MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD: const MessageTemplate( | 3247 MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD: const MessageTemplate( |
3249 MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD, | 3248 MessageKind.ASYNC_MODIFIER_ON_ABSTRACT_METHOD, |
3250 "The modifier '#{modifier}' is not allowed on an abstract method.", | 3249 "The modifier '#{modifier}' is not allowed on an abstract method.", |
3251 options: const ['--enable-async'], | 3250 options: const ['--enable-async'], |
3252 howToFix: "Try removing the '#{modifier}' modifier or adding a " | 3251 howToFix: "Try removing the '#{modifier}' modifier or adding a " |
3253 "body to the method.", | 3252 "body to the method.", |
3254 examples: const [ | 3253 examples: const [ |
3255 """ | 3254 """ |
3256 abstract class A { | 3255 abstract class A { |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3718 static String convertToString(value) { | 3717 static String convertToString(value) { |
3719 if (value is ErrorToken) { | 3718 if (value is ErrorToken) { |
3720 // Shouldn't happen. | 3719 // Shouldn't happen. |
3721 return value.assertionMessage; | 3720 return value.assertionMessage; |
3722 } else if (value is Token) { | 3721 } else if (value is Token) { |
3723 value = value.value; | 3722 value = value.value; |
3724 } | 3723 } |
3725 return '$value'; | 3724 return '$value'; |
3726 } | 3725 } |
3727 } | 3726 } |
OLD | NEW |