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

Side by Side Diff: compiler/java/com/google/dart/compiler/ast/DartNode.java

Issue 8905021: Dartest CL - Please review (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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
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 package com.google.dart.compiler.ast; 5 package com.google.dart.compiler.ast;
6 6
7 import com.google.dart.compiler.common.AbstractNode; 7 import com.google.dart.compiler.common.AbstractNode;
8 import com.google.dart.compiler.common.Symbol; 8 import com.google.dart.compiler.common.Symbol;
9 import com.google.dart.compiler.type.Type; 9 import com.google.dart.compiler.type.Type;
10 import com.google.dart.compiler.type.Types; 10 import com.google.dart.compiler.type.Types;
11 import com.google.dart.compiler.util.DefaultTextOutput; 11 import com.google.dart.compiler.util.DefaultTextOutput;
12 12
13 import java.util.List; 13 import java.util.List;
14 14
15 /** 15 /**
16 * Base class for all Dart AST nodes. 16 * Base class for all Dart AST nodes.
17 */ 17 */
18 public abstract class DartNode extends AbstractNode implements DartVisitable { 18 public abstract class DartNode extends AbstractNode implements DartVisitable {
19 19
20 private DartNode parent; 20 private DartNode parent;
21 private boolean isInstrumentedNode;
21 22
22 public final String toSource() { 23 public final String toSource() {
23 DefaultTextOutput out = new DefaultTextOutput(false); 24 DefaultTextOutput out = new DefaultTextOutput(false);
24 new DartToSourceVisitor(out).accept(this); 25 new DartToSourceVisitor(out).accept(this);
25 return out.toString(); 26 return out.toString();
26 } 27 }
27 28
28 public Symbol getSymbol() { 29 public Symbol getSymbol() {
29 return null; 30 return null;
30 } 31 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 DefaultTextOutput out = new DefaultTextOutput(false); 159 DefaultTextOutput out = new DefaultTextOutput(false);
159 new DartToSourceVisitor(out, true).accept(this); 160 new DartToSourceVisitor(out, true).accept(this);
160 return out.toString().trim().hashCode(); 161 return out.toString().trim().hashCode();
161 } 162 }
162 163
163 @Override 164 @Override
164 public DartNode clone() { 165 public DartNode clone() {
165 // TODO (fabiomfv) - Implement proper cloning when strictly needed. 166 // TODO (fabiomfv) - Implement proper cloning when strictly needed.
166 return this; 167 return this;
167 } 168 }
169
170 public String getObjectIdentifier(){
171 return super.toString();
172 }
173
174 public boolean isInstrumentedNode() {
175 return isInstrumentedNode;
176 }
177
178 public void setInstrumentedNode(boolean isInstrumentedNode) {
179 this.isInstrumentedNode = isInstrumentedNode;
180 }
168 } 181 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698