OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |