| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 EMPTY_CATCH_DECLARATION, | 183 EMPTY_CATCH_DECLARATION, |
| 184 EMPTY_ENUM_DECLARATION, | 184 EMPTY_ENUM_DECLARATION, |
| 185 EMPTY_NAMED_PARAMETER_LIST, | 185 EMPTY_NAMED_PARAMETER_LIST, |
| 186 EMPTY_OPTIONAL_PARAMETER_LIST, | 186 EMPTY_OPTIONAL_PARAMETER_LIST, |
| 187 EMPTY_HIDE, | 187 EMPTY_HIDE, |
| 188 EMPTY_SHOW, | 188 EMPTY_SHOW, |
| 189 EQUAL_MAP_ENTRY_KEY, | 189 EQUAL_MAP_ENTRY_KEY, |
| 190 EXISTING_DEFINITION, | 190 EXISTING_DEFINITION, |
| 191 EXISTING_LABEL, | 191 EXISTING_LABEL, |
| 192 EXPECTED_IDENTIFIER_NOT_RESERVED_WORD, | 192 EXPECTED_IDENTIFIER_NOT_RESERVED_WORD, |
| 193 EXPERIMENTAL_ASSERT_MESSAGE, | |
| 194 EXPONENT_MISSING, | 193 EXPONENT_MISSING, |
| 195 EXPORT_BEFORE_PARTS, | 194 EXPORT_BEFORE_PARTS, |
| 196 EXTERNAL_WITH_BODY, | 195 EXTERNAL_WITH_BODY, |
| 197 EXTRA_CATCH_DECLARATION, | 196 EXTRA_CATCH_DECLARATION, |
| 198 EXTRA_FORMALS, | 197 EXTRA_FORMALS, |
| 199 EXTRANEOUS_MODIFIER, | 198 EXTRANEOUS_MODIFIER, |
| 200 EXTRANEOUS_MODIFIER_REPLACE, | 199 EXTRANEOUS_MODIFIER_REPLACE, |
| 201 FACTORY_REDIRECTION_IN_NON_FACTORY, | 200 FACTORY_REDIRECTION_IN_NON_FACTORY, |
| 202 FINAL_FUNCTION_TYPE_PARAMETER, | 201 FINAL_FUNCTION_TYPE_PARAMETER, |
| 203 FINAL_WITHOUT_INITIALIZER, | 202 FINAL_WITHOUT_INITIALIZER, |
| (...skipping 3447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3651 @JS() | 3650 @JS() |
| 3652 external foo() {} | 3651 external foo() {} |
| 3653 main() => foo(); | 3652 main() => foo(); |
| 3654 """ | 3653 """ |
| 3655 ]), | 3654 ]), |
| 3656 | 3655 |
| 3657 //////////////////////////////////////////////////////////////////////////
//// | 3656 //////////////////////////////////////////////////////////////////////////
//// |
| 3658 // Patch errors end. | 3657 // Patch errors end. |
| 3659 //////////////////////////////////////////////////////////////////////////
//// | 3658 //////////////////////////////////////////////////////////////////////////
//// |
| 3660 | 3659 |
| 3661 MessageKind.EXPERIMENTAL_ASSERT_MESSAGE: const MessageTemplate( | |
| 3662 MessageKind.EXPERIMENTAL_ASSERT_MESSAGE, | |
| 3663 "Experimental language feature 'assertion with message'" | |
| 3664 " is not supported.", | |
| 3665 howToFix: | |
| 3666 "Use option '--assert-message' to use assertions with messages.", | |
| 3667 examples: const [ | |
| 3668 r''' | |
| 3669 main() { | |
| 3670 int n = -7; | |
| 3671 assert(n > 0, 'must be positive: $n'); | |
| 3672 } | |
| 3673 ''' | |
| 3674 ]), | |
| 3675 | |
| 3676 MessageKind.IMPORT_EXPERIMENTAL_MIRRORS: const MessageTemplate( | 3660 MessageKind.IMPORT_EXPERIMENTAL_MIRRORS: const MessageTemplate( |
| 3677 MessageKind.IMPORT_EXPERIMENTAL_MIRRORS, | 3661 MessageKind.IMPORT_EXPERIMENTAL_MIRRORS, |
| 3678 r''' | 3662 r''' |
| 3679 | 3663 |
| 3680 **************************************************************** | 3664 **************************************************************** |
| 3681 * WARNING: dart:mirrors support in dart2js is experimental, | 3665 * WARNING: dart:mirrors support in dart2js is experimental, |
| 3682 * and not recommended. | 3666 * and not recommended. |
| 3683 * This implementation of mirrors is incomplete, | 3667 * This implementation of mirrors is incomplete, |
| 3684 * and often greatly increases the size of the generated | 3668 * and often greatly increases the size of the generated |
| 3685 * JavaScript code. | 3669 * JavaScript code. |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3821 static String convertToString(value) { | 3805 static String convertToString(value) { |
| 3822 if (value is ErrorToken) { | 3806 if (value is ErrorToken) { |
| 3823 // Shouldn't happen. | 3807 // Shouldn't happen. |
| 3824 return value.assertionMessage; | 3808 return value.assertionMessage; |
| 3825 } else if (value is Token) { | 3809 } else if (value is Token) { |
| 3826 value = value.value; | 3810 value = value.value; |
| 3827 } | 3811 } |
| 3828 return '$value'; | 3812 return '$value'; |
| 3829 } | 3813 } |
| 3830 } | 3814 } |
| OLD | NEW |