| 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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 examples: const [ | 669 examples: const [ |
| 670 """ | 670 """ |
| 671 class C { | 671 class C { |
| 672 void f() {} | 672 void f() {} |
| 673 int get f => 1; | 673 int get f => 1; |
| 674 } | 674 } |
| 675 | 675 |
| 676 main() { | 676 main() { |
| 677 new C(); | 677 new C(); |
| 678 } | 678 } |
| 679 """, | |
| 680 """ | |
| 681 class C { | |
| 682 int x; | |
| 683 C(this.x, int x); | |
| 684 } | |
| 685 | 679 |
| 686 main() { | |
| 687 new C(4, 2); | |
| 688 } | |
| 689 """ | 680 """ |
| 690 ]), | 681 ]), |
| 691 | 682 |
| 692 MessageKind.EXISTING_DEFINITION: const MessageTemplate( | 683 MessageKind.EXISTING_DEFINITION: const MessageTemplate( |
| 693 MessageKind.EXISTING_DEFINITION, "Existing definition of '#{name}'."), | 684 MessageKind.EXISTING_DEFINITION, "Existing definition of '#{name}'."), |
| 694 | 685 |
| 695 MessageKind.DUPLICATE_IMPORT: const MessageTemplate( | 686 MessageKind.DUPLICATE_IMPORT: const MessageTemplate( |
| 696 MessageKind.DUPLICATE_IMPORT, "Duplicate import of '#{name}'."), | 687 MessageKind.DUPLICATE_IMPORT, "Duplicate import of '#{name}'."), |
| 697 | 688 |
| 698 MessageKind.HIDDEN_IMPORT: const MessageTemplate( | 689 MessageKind.HIDDEN_IMPORT: const MessageTemplate( |
| (...skipping 3061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3760 static String convertToString(value) { | 3751 static String convertToString(value) { |
| 3761 if (value is ErrorToken) { | 3752 if (value is ErrorToken) { |
| 3762 // Shouldn't happen. | 3753 // Shouldn't happen. |
| 3763 return value.assertionMessage; | 3754 return value.assertionMessage; |
| 3764 } else if (value is Token) { | 3755 } else if (value is Token) { |
| 3765 value = value.value; | 3756 value = value.value; |
| 3766 } | 3757 } |
| 3767 return '$value'; | 3758 return '$value'; |
| 3768 } | 3759 } |
| 3769 } | 3760 } |
| OLD | NEW |