| 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 3072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3083 """ | 3083 """ |
| 3084 ]), | 3084 ]), |
| 3085 | 3085 |
| 3086 MessageKind.UNMATCHED_TOKEN: const MessageTemplate( | 3086 MessageKind.UNMATCHED_TOKEN: const MessageTemplate( |
| 3087 MessageKind.UNMATCHED_TOKEN, | 3087 MessageKind.UNMATCHED_TOKEN, |
| 3088 "Can't find '#{end}' to match '#{begin}'.", | 3088 "Can't find '#{end}' to match '#{begin}'.", |
| 3089 howToFix: DONT_KNOW_HOW_TO_FIX, | 3089 howToFix: DONT_KNOW_HOW_TO_FIX, |
| 3090 examples: const [ | 3090 examples: const [ |
| 3091 "main(", | 3091 "main(", |
| 3092 "main(){", | 3092 "main(){", |
| 3093 "main(){]}", | 3093 "main(){[}", |
| 3094 // TODO(ahe): https://github.com/dart-lang/sdk/issues/28495 |
| 3095 // "main(){]}", |
| 3094 ]), | 3096 ]), |
| 3095 | 3097 |
| 3096 MessageKind.UNTERMINATED_TOKEN: const MessageTemplate( | 3098 MessageKind.UNTERMINATED_TOKEN: const MessageTemplate( |
| 3097 MessageKind.UNTERMINATED_TOKEN, | 3099 MessageKind.UNTERMINATED_TOKEN, |
| 3098 // This is a fall-back message that shouldn't happen. | 3100 // This is a fall-back message that shouldn't happen. |
| 3099 "Incomplete token."), | 3101 "Incomplete token."), |
| 3100 | 3102 |
| 3101 MessageKind.EXPONENT_MISSING: const MessageTemplate( | 3103 MessageKind.EXPONENT_MISSING: const MessageTemplate( |
| 3102 MessageKind.EXPONENT_MISSING, | 3104 MessageKind.EXPONENT_MISSING, |
| 3103 "Numbers in exponential notation should always contain an exponent" | 3105 "Numbers in exponential notation should always contain an exponent" |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3805 static String convertToString(value) { | 3807 static String convertToString(value) { |
| 3806 if (value is ErrorToken) { | 3808 if (value is ErrorToken) { |
| 3807 // Shouldn't happen. | 3809 // Shouldn't happen. |
| 3808 return value.assertionMessage; | 3810 return value.assertionMessage; |
| 3809 } else if (value is Token) { | 3811 } else if (value is Token) { |
| 3810 value = value.value; | 3812 value = value.value; |
| 3811 } | 3813 } |
| 3812 return '$value'; | 3814 return '$value'; |
| 3813 } | 3815 } |
| 3814 } | 3816 } |
| OLD | NEW |