| 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 java.util.List; | 7 import java.util.List; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Represents a Dart function. | 10 * Represents a Dart function. |
| 11 */ | 11 */ |
| (...skipping 17 matching lines...) Expand all Loading... |
| 29 return parameters; | 29 return parameters; |
| 30 } | 30 } |
| 31 | 31 |
| 32 public DartTypeNode getReturnTypeNode() { | 32 public DartTypeNode getReturnTypeNode() { |
| 33 return returnTypeNode; | 33 return returnTypeNode; |
| 34 } | 34 } |
| 35 | 35 |
| 36 @Override | 36 @Override |
| 37 public void visitChildren(ASTVisitor<?> visitor) { | 37 public void visitChildren(ASTVisitor<?> visitor) { |
| 38 parameters.accept(visitor); | 38 parameters.accept(visitor); |
| 39 if (body != null) { | 39 safelyVisitChild(body, visitor); |
| 40 body.accept(visitor); | 40 safelyVisitChild(returnTypeNode, visitor); |
| 41 } | |
| 42 if (returnTypeNode != null) { | |
| 43 returnTypeNode.accept(visitor); | |
| 44 } | |
| 45 } | 41 } |
| 46 | 42 |
| 47 @Override | 43 @Override |
| 48 public <R> R accept(ASTVisitor<R> visitor) { | 44 public <R> R accept(ASTVisitor<R> visitor) { |
| 49 return visitor.visitFunction(this); | 45 return visitor.visitFunction(this); |
| 50 } | 46 } |
| 51 } | 47 } |
| OLD | NEW |