| OLD | NEW |
| 1 // Copyright (c) 2011, 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.resolver.Element; | 7 import com.google.dart.compiler.resolver.Element; |
| 8 import com.google.dart.compiler.resolver.MethodNodeElement; | 8 import com.google.dart.compiler.resolver.MethodNodeElement; |
| 9 | 9 |
| 10 import java.util.Collections; | 10 import java.util.Collections; |
| 11 import java.util.List; | 11 import java.util.List; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 this.element = (MethodNodeElement) element; | 49 this.element = (MethodNodeElement) element; |
| 50 } | 50 } |
| 51 | 51 |
| 52 public List<DartInitializer> getInitializers() { | 52 public List<DartInitializer> getInitializers() { |
| 53 return Collections.emptyList(); | 53 return Collections.emptyList(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 @Override | 56 @Override |
| 57 public void visitChildren(ASTVisitor<?> visitor) { | 57 public void visitChildren(ASTVisitor<?> visitor) { |
| 58 super.visitChildren(visitor); | 58 super.visitChildren(visitor); |
| 59 function.accept(visitor); | 59 safelyVisitChild(function, visitor); |
| 60 } | 60 } |
| 61 | 61 |
| 62 @Override | 62 @Override |
| 63 public <R> R accept(ASTVisitor<R> visitor) { | 63 public <R> R accept(ASTVisitor<R> visitor) { |
| 64 return visitor.visitMethodDefinition(this); | 64 return visitor.visitMethodDefinition(this); |
| 65 } | 65 } |
| 66 | 66 |
| 67 private static class DartMethodWithInitializersDefinition extends DartMethodDe
finition { | 67 private static class DartMethodWithInitializersDefinition extends DartMethodDe
finition { |
| 68 | 68 |
| 69 private final NodeList<DartInitializer> initializers = NodeList.create(this)
; | 69 private final NodeList<DartInitializer> initializers = NodeList.create(this)
; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 81 return initializers; | 81 return initializers; |
| 82 } | 82 } |
| 83 | 83 |
| 84 @Override | 84 @Override |
| 85 public void visitChildren(ASTVisitor<?> visitor) { | 85 public void visitChildren(ASTVisitor<?> visitor) { |
| 86 super.visitChildren(visitor); | 86 super.visitChildren(visitor); |
| 87 initializers.accept(visitor); | 87 initializers.accept(visitor); |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 } | 90 } |
| OLD | NEW |