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

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

Issue 10702054: Issue 3931. Visit children nodes safely. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698