| 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 class MessageKind { | 7 class MessageKind { |
| 8 final String template; | 8 final String template; |
| 9 const MessageKind(this.template); | 9 const MessageKind(this.template); |
| 10 | 10 |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 | 593 |
| 594 String toString() { | 594 String toString() { |
| 595 return computeMessage(); | 595 return computeMessage(); |
| 596 } | 596 } |
| 597 | 597 |
| 598 bool operator==(other) { | 598 bool operator==(other) { |
| 599 if (other is !Message) return false; | 599 if (other is !Message) return false; |
| 600 return (kind == other.kind) && (toString() == other.toString()); | 600 return (kind == other.kind) && (toString() == other.toString()); |
| 601 } | 601 } |
| 602 | 602 |
| 603 int get hashCode => throw new UnsupportedError('Message.hashCode'); |
| 604 |
| 603 String slowToString(object) { | 605 String slowToString(object) { |
| 604 if (object is SourceString) { | 606 if (object is SourceString) { |
| 605 return object.slowToString(); | 607 return object.slowToString(); |
| 606 } else { | 608 } else { |
| 607 return object.toString(); | 609 return object.toString(); |
| 608 } | 610 } |
| 609 } | 611 } |
| 610 } | 612 } |
| 611 | 613 |
| 612 class Diagnostic { | 614 class Diagnostic { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 633 | 635 |
| 634 class CompileTimeConstantError extends Diagnostic { | 636 class CompileTimeConstantError extends Diagnostic { |
| 635 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) | 637 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) |
| 636 : super(kind, arguments); | 638 : super(kind, arguments); |
| 637 } | 639 } |
| 638 | 640 |
| 639 class CompilationError extends Diagnostic { | 641 class CompilationError extends Diagnostic { |
| 640 CompilationError(MessageKind kind, [Map arguments = const {}]) | 642 CompilationError(MessageKind kind, [Map arguments = const {}]) |
| 641 : super(kind, arguments); | 643 : super(kind, arguments); |
| 642 } | 644 } |
| OLD | NEW |