| 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 library dart2js.messages; | 5 library dart2js.messages; |
| 6 | 6 |
| 7 import 'package:dart_messages/shared_messages.dart' as shared_messages; |
| 8 |
| 7 import '../tokens/token.dart' show ErrorToken, Token; | 9 import '../tokens/token.dart' show ErrorToken, Token; |
| 8 | 10 |
| 9 import 'invariant.dart' show invariant; | 11 import 'invariant.dart' show invariant; |
| 10 import 'spannable.dart' show CURRENT_ELEMENT_SPANNABLE; | 12 import 'spannable.dart' show CURRENT_ELEMENT_SPANNABLE; |
| 11 | 13 |
| 12 import 'dart2js_messages.dart' as dart2js_messages; | 14 import 'dart2js_messages.dart' as dart2js_messages; |
| 13 import 'shared_messages.dart' as shared_messages; | |
| 14 | 15 |
| 15 /// Keys for the [MessageTemplate]s. | 16 /// Keys for the [MessageTemplate]s. |
| 16 enum MessageKind { | 17 enum MessageKind { |
| 17 ABSTRACT_CLASS_INSTANTIATION, | 18 ABSTRACT_CLASS_INSTANTIATION, |
| 18 ABSTRACT_GETTER, | 19 ABSTRACT_GETTER, |
| 19 ABSTRACT_METHOD, | 20 ABSTRACT_METHOD, |
| 20 ABSTRACT_SETTER, | 21 ABSTRACT_SETTER, |
| 21 ACCESSED_IN_CLOSURE, | 22 ACCESSED_IN_CLOSURE, |
| 22 ACCESSED_IN_CLOSURE_HERE, | 23 ACCESSED_IN_CLOSURE_HERE, |
| 23 ADDITIONAL_ARGUMENT, | 24 ADDITIONAL_ARGUMENT, |
| (...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 static String convertToString(value) { | 988 static String convertToString(value) { |
| 988 if (value is ErrorToken) { | 989 if (value is ErrorToken) { |
| 989 // Shouldn't happen. | 990 // Shouldn't happen. |
| 990 return value.assertionMessage; | 991 return value.assertionMessage; |
| 991 } else if (value is Token) { | 992 } else if (value is Token) { |
| 992 value = value.value; | 993 value = value.value; |
| 993 } | 994 } |
| 994 return '$value'; | 995 return '$value'; |
| 995 } | 996 } |
| 996 } | 997 } |
| OLD | NEW |