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