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 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; | 7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; |
8 | 8 |
9 /** | 9 /** |
10 * The messages in this file should meet the following guide lines: | 10 * The messages in this file should meet the following guide lines: |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 static const MessageKind NOT_CALLABLE = const MessageKind( | 161 static const MessageKind NOT_CALLABLE = const MessageKind( |
162 "'#{elementName}' is not callable."); | 162 "'#{elementName}' is not callable."); |
163 | 163 |
164 static const MessageKind MEMBER_NOT_STATIC = const MessageKind( | 164 static const MessageKind MEMBER_NOT_STATIC = const MessageKind( |
165 "'#{className}.#{memberName}' is not static."); | 165 "'#{className}.#{memberName}' is not static."); |
166 | 166 |
167 static const MessageKind NO_INSTANCE_AVAILABLE = const MessageKind( | 167 static const MessageKind NO_INSTANCE_AVAILABLE = const MessageKind( |
168 "'#{name}' is only available in instance methods."); | 168 "'#{name}' is only available in instance methods."); |
169 | 169 |
170 static const MessageKind NO_SUPER_AVAILABLE = const MessageKind( | 170 static const MessageKind NO_THIS_AVAILABLE = const MessageKind( |
171 "'super' is only available in instance methods."); | 171 "'this' is only available in instance methods."); |
172 | 172 |
173 static const MessageKind PRIVATE_ACCESS = const MessageKind( | 173 static const MessageKind PRIVATE_ACCESS = const MessageKind( |
174 "'#{name}' is declared private within library " | 174 "'#{name}' is declared private within library " |
175 "'#{libraryName}'."); | 175 "'#{libraryName}'."); |
176 | 176 |
177 static const MessageKind THIS_IS_THE_DECLARATION = const MessageKind( | 177 static const MessageKind THIS_IS_THE_DECLARATION = const MessageKind( |
178 "This is the declaration of '#{name}'."); | 178 "This is the declaration of '#{name}'."); |
179 | 179 |
180 static const MessageKind THIS_IS_THE_METHOD = const MessageKind( | 180 static const MessageKind THIS_IS_THE_METHOD = const MessageKind( |
181 "This is the method declaration."); | 181 "This is the method declaration."); |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 examples: const [""" | 591 examples: const [""" |
592 class C<T extends num> {} | 592 class C<T extends num> {} |
593 | 593 |
594 // 'String' is not a valid instantiation of T with bound num.'. | 594 // 'String' is not a valid instantiation of T with bound num.'. |
595 main() => new C<String>(); | 595 main() => new C<String>(); |
596 """]); | 596 """]); |
597 | 597 |
598 static const MessageKind INVALID_USE_OF_SUPER = const MessageKind( | 598 static const MessageKind INVALID_USE_OF_SUPER = const MessageKind( |
599 "'super' not allowed here."); | 599 "'super' not allowed here."); |
600 | 600 |
| 601 static const MessageKind INVALID_USE_OF_THIS = const MessageKind( |
| 602 "'this' not allowed here."); |
| 603 |
601 static const MessageKind INVALID_CASE_DEFAULT = const MessageKind( | 604 static const MessageKind INVALID_CASE_DEFAULT = const MessageKind( |
602 "'default' only allowed on last case of a switch."); | 605 "'default' only allowed on last case of a switch."); |
603 | 606 |
604 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL = const MessageKind( | 607 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL = const MessageKind( |
605 "'case' expressions do not all have type '#{type}'."); | 608 "'case' expressions do not all have type '#{type}'."); |
606 | 609 |
607 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL_CASE = const MessageKind( | 610 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL_CASE = const MessageKind( |
608 "'case' expression of type '#{type}'."); | 611 "'case' expression of type '#{type}'."); |
609 | 612 |
610 static const MessageKind SWITCH_CASE_FORBIDDEN = const MessageKind( | 613 static const MessageKind SWITCH_CASE_FORBIDDEN = const MessageKind( |
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2572 static String convertToString(value) { | 2575 static String convertToString(value) { |
2573 if (value is ErrorToken) { | 2576 if (value is ErrorToken) { |
2574 // Shouldn't happen. | 2577 // Shouldn't happen. |
2575 return value.assertionMessage; | 2578 return value.assertionMessage; |
2576 } else if (value is Token) { | 2579 } else if (value is Token) { |
2577 value = value.value; | 2580 value = value.value; |
2578 } | 2581 } |
2579 return '$value'; | 2582 return '$value'; |
2580 } | 2583 } |
2581 } | 2584 } |
OLD | NEW |