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 /** | 6 /** |
7 * The messages in this file should meet the following guide lines: | 7 * The messages in this file should meet the following guide lines: |
8 * | 8 * |
9 * 1. The message should be a complete sentence starting with an uppercase | 9 * 1. The message should be a complete sentence starting with an uppercase |
10 * letter, and ending with a period. | 10 * letter, and ending with a period. |
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1840 "Operator '#{operatorName}' must have exactly 2 parameters."), | 1840 "Operator '#{operatorName}' must have exactly 2 parameters."), |
1841 | 1841 |
1842 MessageKind.OPERATOR_OPTIONAL_PARAMETERS: | 1842 MessageKind.OPERATOR_OPTIONAL_PARAMETERS: |
1843 const MessageTemplate(MessageKind.OPERATOR_OPTIONAL_PARAMETERS, | 1843 const MessageTemplate(MessageKind.OPERATOR_OPTIONAL_PARAMETERS, |
1844 "Operator '#{operatorName}' cannot have optional parameters."), | 1844 "Operator '#{operatorName}' cannot have optional parameters."), |
1845 | 1845 |
1846 MessageKind.OPERATOR_NAMED_PARAMETERS: | 1846 MessageKind.OPERATOR_NAMED_PARAMETERS: |
1847 const MessageTemplate(MessageKind.OPERATOR_NAMED_PARAMETERS, | 1847 const MessageTemplate(MessageKind.OPERATOR_NAMED_PARAMETERS, |
1848 "Operator '#{operatorName}' cannot have named parameters."), | 1848 "Operator '#{operatorName}' cannot have named parameters."), |
1849 | 1849 |
1850 MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE: | |
1851 const MessageTemplate(MessageKind.CONSTRUCTOR_WITH_RETURN_TYPE, | |
1852 "Cannot have return type for constructor."), | |
1853 | |
1854 MessageKind.CANNOT_RETURN_FROM_CONSTRUCTOR: | 1850 MessageKind.CANNOT_RETURN_FROM_CONSTRUCTOR: |
1855 const MessageTemplate(MessageKind.CANNOT_RETURN_FROM_CONSTRUCTOR, | 1851 const MessageTemplate(MessageKind.CANNOT_RETURN_FROM_CONSTRUCTOR, |
1856 "Constructors can't return values.", | 1852 "Constructors can't return values.", |
1857 howToFix: "Remove the return statement or use a factory constructor.", | 1853 howToFix: "Remove the return statement or use a factory constructor.", |
1858 examples: const [""" | 1854 examples: const [""" |
1859 class C { | 1855 class C { |
1860 C() { | 1856 C() { |
1861 return 1; | 1857 return 1; |
1862 } | 1858 } |
1863 } | 1859 } |
(...skipping 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3708 static String convertToString(value) { | 3704 static String convertToString(value) { |
3709 if (value is ErrorToken) { | 3705 if (value is ErrorToken) { |
3710 // Shouldn't happen. | 3706 // Shouldn't happen. |
3711 return value.assertionMessage; | 3707 return value.assertionMessage; |
3712 } else if (value is Token) { | 3708 } else if (value is Token) { |
3713 value = value.value; | 3709 value = value.value; |
3714 } | 3710 } |
3715 return '$value'; | 3711 return '$value'; |
3716 } | 3712 } |
3717 } | 3713 } |
OLD | NEW |