| Index: compiler/java/com/google/dart/compiler/ast/DartFunction.java
|
| diff --git a/compiler/java/com/google/dart/compiler/ast/DartFunction.java b/compiler/java/com/google/dart/compiler/ast/DartFunction.java
|
| index 28baa5f3c312379bc74754818b2ae69eaa289de7..2c28f807e96729f093e934c2eef291ad589ac591 100644
|
| --- a/compiler/java/com/google/dart/compiler/ast/DartFunction.java
|
| +++ b/compiler/java/com/google/dart/compiler/ast/DartFunction.java
|
| @@ -11,26 +11,22 @@ import java.util.List;
|
| */
|
| public class DartFunction extends DartNode {
|
|
|
| - private final List<DartParameter> params;
|
| + private final NodeList<DartParameter> parameters = NodeList.create(this);
|
| private DartBlock body;
|
| private DartTypeNode returnTypeNode;
|
|
|
| - public DartFunction(List<DartParameter> arguments, DartBlock body, DartTypeNode returnTypeNode) {
|
| - this.params = becomeParentOf(arguments);
|
| + public DartFunction(List<DartParameter> parameters, DartBlock body, DartTypeNode returnTypeNode) {
|
| + this.parameters.addAll(parameters);
|
| this.body = becomeParentOf(body);
|
| this.returnTypeNode = becomeParentOf(returnTypeNode);
|
| }
|
|
|
| - public void addParam(DartParameter param) {
|
| - params.add(param);
|
| - }
|
| -
|
| public DartBlock getBody() {
|
| return body;
|
| }
|
|
|
| - public List<DartParameter> getParams() {
|
| - return params;
|
| + public List<DartParameter> getParameters() {
|
| + return parameters;
|
| }
|
|
|
| public DartTypeNode getReturnTypeNode() {
|
| @@ -39,7 +35,7 @@ public class DartFunction extends DartNode {
|
|
|
| @Override
|
| public void visitChildren(ASTVisitor<?> visitor) {
|
| - visitor.visit(params);
|
| + parameters.accept(visitor);
|
| if (body != null) {
|
| body.accept(visitor);
|
| }
|
|
|