| 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 interface Visitor<R> { | 5 interface Visitor<R> { |
| 6 R visitBlock(Block node); | 6 R visitBlock(Block node); |
| 7 R visitBreakStatement(BreakStatement node); | 7 R visitBreakStatement(BreakStatement node); |
| 8 R visitCatchBlock(CatchBlock node); | 8 R visitCatchBlock(CatchBlock node); |
| 9 R visitClassNode(ClassNode node); | 9 R visitClassNode(ClassNode node); |
| 10 R visitConditional(Conditional node); | 10 R visitConditional(Conditional node); |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 | 722 |
| 723 class DartString implements Iterable<int> { | 723 class DartString implements Iterable<int> { |
| 724 factory DartString.literal(String string) => new LiteralDartString(string); | 724 factory DartString.literal(String string) => new LiteralDartString(string); |
| 725 factory DartString.rawString(SourceString source, int length) => | 725 factory DartString.rawString(SourceString source, int length) => |
| 726 new RawSourceDartString(source, length); | 726 new RawSourceDartString(source, length); |
| 727 factory DartString.escapedString(SourceString source, int length) => | 727 factory DartString.escapedString(SourceString source, int length) => |
| 728 new EscapedSourceDartString(source, length); | 728 new EscapedSourceDartString(source, length); |
| 729 DartString(); | 729 DartString(); |
| 730 abstract int get length(); | 730 abstract int get length(); |
| 731 bool isEmpty() => length == 0; | 731 bool isEmpty() => length == 0; |
| 732 // TODO(lrn): Is this test too expensive? | |
| 733 bool definitelyEquals(DartString other) => toString() == other.toString(); | |
| 734 abstract Iterator<int> iterator(); | 732 abstract Iterator<int> iterator(); |
| 735 abstract String toString(); | 733 abstract String toString(); |
| 736 | 734 |
| 737 bool operator ==(var other) { | 735 bool operator ==(var other) { |
| 738 if (other is !DartString) return false; | 736 if (other is !DartString) return false; |
| 739 DartString otherString = other; | 737 DartString otherString = other; |
| 740 if (length != otherString.length) return false; | 738 if (length != otherString.length) return false; |
| 741 Iterator it1 = iterator(); | 739 Iterator it1 = iterator(); |
| 742 Iterator it2 = otherString.iterator(); | 740 Iterator it2 = otherString.iterator(); |
| 743 while (it1.hasNext()) { | 741 while (it1.hasNext()) { |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1684 static bool isConstructorRedirect(Send node) { | 1682 static bool isConstructorRedirect(Send node) { |
| 1685 return (node.receiver === null && | 1683 return (node.receiver === null && |
| 1686 node.selector.asIdentifier() !== null && | 1684 node.selector.asIdentifier() !== null && |
| 1687 node.selector.asIdentifier().isThis()) || | 1685 node.selector.asIdentifier().isThis()) || |
| 1688 (node.receiver !== null && | 1686 (node.receiver !== null && |
| 1689 node.receiver.asIdentifier() !== null && | 1687 node.receiver.asIdentifier() !== null && |
| 1690 node.receiver.asIdentifier().isThis() && | 1688 node.receiver.asIdentifier().isThis() && |
| 1691 node.selector.asIdentifier() !== null); | 1689 node.selector.asIdentifier() !== null); |
| 1692 } | 1690 } |
| 1693 } | 1691 } |
| OLD | NEW |