| 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 /// The messages in this file should follow the [Guide for Writing | 5 /// The messages in this file should follow the [Guide for Writing |
| 6 /// Diagnostics](../../../../front_end/lib/src/fasta/diagnostics.md). | 6 /// Diagnostics](../../../../front_end/lib/src/fasta/diagnostics.md). |
| 7 /// | 7 /// |
| 8 /// Other things to keep in mind: | 8 /// Other things to keep in mind: |
| 9 /// | 9 /// |
| 10 /// An INFO message should always be preceded by a non-INFO message, and the | 10 /// An INFO message should always be preceded by a non-INFO message, and the |
| (...skipping 3754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3765 return (template == other.template) && (toString() == other.toString()); | 3765 return (template == other.template) && (toString() == other.toString()); |
| 3766 } | 3766 } |
| 3767 | 3767 |
| 3768 int get hashCode => throw new UnsupportedError('Message.hashCode'); | 3768 int get hashCode => throw new UnsupportedError('Message.hashCode'); |
| 3769 | 3769 |
| 3770 static String convertToString(value) { | 3770 static String convertToString(value) { |
| 3771 if (value is ErrorToken) { | 3771 if (value is ErrorToken) { |
| 3772 // Shouldn't happen. | 3772 // Shouldn't happen. |
| 3773 return value.assertionMessage; | 3773 return value.assertionMessage; |
| 3774 } else if (value is Token) { | 3774 } else if (value is Token) { |
| 3775 value = value.value; | 3775 value = value.lexeme; |
| 3776 } | 3776 } |
| 3777 return '$value'; | 3777 return '$value'; |
| 3778 } | 3778 } |
| 3779 } | 3779 } |
| OLD | NEW |