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

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

Issue 10885031: Issue 3968. Support for redirecting factory constructors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « no previous file | compiler/java/com/google/dart/compiler/resolver/MemberBuilder.java » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.util.TextOutput; 7 import com.google.dart.compiler.util.TextOutput;
8 8
9 import java.util.Iterator; 9 import java.util.Iterator;
10 import java.util.List; 10 import java.util.List;
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 for (int i = 0; i < inits.size(); ++i) { 289 for (int i = 0; i < inits.size(); ++i) {
290 accept(inits.get(i)); 290 accept(inits.get(i));
291 if (i < inits.size() - 1) { 291 if (i < inits.size() - 1) {
292 p(", "); 292 p(", ");
293 } 293 }
294 } 294 }
295 } 295 }
296 // body 296 // body
297 if (x.getFunction().getBody() != null) { 297 if (x.getFunction().getBody() != null) {
298 accept(x.getFunction().getBody()); 298 accept(x.getFunction().getBody());
299 } else if (x.getRedirectedTypeName() != null) {
300 p(" = ");
301 accept(x.getRedirectedTypeName());
302 if (x.getRedirectedConstructorName() != null) {
303 p(".");
304 accept(x.getRedirectedConstructorName());
305 }
306 p(";");
307 nl();
299 } else { 308 } else {
300 p(";"); 309 p(";");
301 nl(); 310 nl();
302 } 311 }
303 // done 312 // done
304 return null; 313 return null;
305 } 314 }
306 315
307 @Override 316 @Override
308 public Void visitInitializer(DartInitializer x) { 317 public Void visitInitializer(DartInitializer x) {
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 } 1003 }
995 1004
996 private void indent() { 1005 private void indent() {
997 out.indentIn(); 1006 out.indentIn();
998 } 1007 }
999 1008
1000 private void outdent() { 1009 private void outdent() {
1001 out.indentOut(); 1010 out.indentOut();
1002 } 1011 }
1003 } 1012 }
OLDNEW
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/resolver/MemberBuilder.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698