Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Side by Side Diff: frog/leg/tree/nodes.dart

Issue 9665001: Implement constant maps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove trailing whitespace. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « frog/leg/lib/js_helper.dart ('k') | frog/leg/warnings.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 if (other is !DartString) return false; 745 if (other is !DartString) return false;
746 DartString otherString = other; 746 DartString otherString = other;
747 if (length != otherString.length) return false; 747 if (length != otherString.length) return false;
748 Iterator it1 = iterator(); 748 Iterator it1 = iterator();
749 Iterator it2 = otherString.iterator(); 749 Iterator it2 = otherString.iterator();
750 while (it1.hasNext()) { 750 while (it1.hasNext()) {
751 if (it1.next() != it2.next()) return false; 751 if (it1.next() != it2.next()) return false;
752 } 752 }
753 return true; 753 return true;
754 } 754 }
755 String toString() => "DartString#${length()}:${slowToString()}"; 755 String toString() => "DartString#${length}:${slowToString()}";
756 abstract SourceString get source(); 756 abstract SourceString get source();
757 } 757 }
758 758
759 class LiteralDartString extends DartString { 759 class LiteralDartString extends DartString {
760 final String string; 760 final String string;
761 const LiteralDartString(this.string); 761 const LiteralDartString(this.string);
762 int get length() => string.length; 762 int get length() => string.length;
763 Iterator<int> iterator() => new StringCodeIterator(string); 763 Iterator<int> iterator() => new StringCodeIterator(string);
764 String slowToString() => string; 764 String slowToString() => string;
765 SourceString get source() => new StringWrapper(string); 765 SourceString get source() => new StringWrapper(string);
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 static bool isConstructorRedirect(Send node) { 1707 static bool isConstructorRedirect(Send node) {
1708 return (node.receiver === null && 1708 return (node.receiver === null &&
1709 node.selector.asIdentifier() !== null && 1709 node.selector.asIdentifier() !== null &&
1710 node.selector.asIdentifier().isThis()) || 1710 node.selector.asIdentifier().isThis()) ||
1711 (node.receiver !== null && 1711 (node.receiver !== null &&
1712 node.receiver.asIdentifier() !== null && 1712 node.receiver.asIdentifier() !== null &&
1713 node.receiver.asIdentifier().isThis() && 1713 node.receiver.asIdentifier().isThis() &&
1714 node.selector.asIdentifier() !== null); 1714 node.selector.asIdentifier() !== null);
1715 } 1715 }
1716 } 1716 }
OLDNEW
« no previous file with comments | « frog/leg/lib/js_helper.dart ('k') | frog/leg/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698