| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 static const MessageKind THIS_IS_THE_DECLARATION = const MessageKind( | 149 static const MessageKind THIS_IS_THE_DECLARATION = const MessageKind( |
| 150 "This is the declaration of '#{name}'."); | 150 "This is the declaration of '#{name}'."); |
| 151 | 151 |
| 152 static const MessageKind THIS_IS_THE_METHOD = const MessageKind( | 152 static const MessageKind THIS_IS_THE_METHOD = const MessageKind( |
| 153 "This is the method declaration."); | 153 "This is the method declaration."); |
| 154 | 154 |
| 155 static const MessageKind CANNOT_RESOLVE = const MessageKind( | 155 static const MessageKind CANNOT_RESOLVE = const MessageKind( |
| 156 "Cannot resolve '#{name}'."); | 156 "Cannot resolve '#{name}'."); |
| 157 | 157 |
| 158 static const MessageKind CANNOT_RESOLVE_IN_INITIALIZER = const MessageKind( |
| 159 "Cannot resolve '#{name}'. It would be implicitly looked up on this " |
| 160 "instance, but instances are not available in initializers.", |
| 161 howToFix: "Try correcting the unresolved reference or move the " |
| 162 "initialization to a constructor body.", |
| 163 examples: const [""" |
| 164 class A { |
| 165 var test = unresolvedName; |
| 166 } |
| 167 main() => new A(); |
| 168 """]); |
| 169 |
| 158 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind( | 170 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR = const MessageKind( |
| 159 "Cannot resolve constructor '#{constructorName}'."); | 171 "Cannot resolve constructor '#{constructorName}'."); |
| 160 | 172 |
| 161 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT = | 173 static const MessageKind CANNOT_RESOLVE_CONSTRUCTOR_FOR_IMPLICIT = |
| 162 const MessageKind("cannot resolve constructor '#{constructorName}'" | 174 const MessageKind("cannot resolve constructor '#{constructorName}'" |
| 163 " for implicit super call.", | 175 " for implicit super call.", |
| 164 howToFix: "Try explicitly invoking a constructor of the super class", | 176 howToFix: "Try explicitly invoking a constructor of the super class", |
| 165 examples: const [""" | 177 examples: const [""" |
| 166 class A { | 178 class A { |
| 167 A.foo() {} | 179 A.foo() {} |
| (...skipping 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2487 static String convertToString(value) { | 2499 static String convertToString(value) { |
| 2488 if (value is ErrorToken) { | 2500 if (value is ErrorToken) { |
| 2489 // Shouldn't happen. | 2501 // Shouldn't happen. |
| 2490 return value.assertionMessage; | 2502 return value.assertionMessage; |
| 2491 } else if (value is Token) { | 2503 } else if (value is Token) { |
| 2492 value = value.value; | 2504 value = value.value; |
| 2493 } | 2505 } |
| 2494 return '$value'; | 2506 return '$value'; |
| 2495 } | 2507 } |
| 2496 } | 2508 } |
| OLD | NEW |