| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library analyzer.dart.ast.visitor; | 5 library analyzer.dart.ast.visitor; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/generated/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * An AST visitor that will recursively visit all of the nodes in an AST | 12 * An AST visitor that will recursively visit all of the nodes in an AST |
| 13 * structure, similar to [GeneralizingAstVisitor]. This visitor uses a | 13 * structure, similar to [GeneralizingAstVisitor]. This visitor uses a |
| 14 * breadth-first ordering rather than the depth-first ordering of | 14 * breadth-first ordering rather than the depth-first ordering of |
| 15 * [GeneralizingAstVisitor]. | 15 * [GeneralizingAstVisitor]. |
| 16 * | 16 * |
| 17 * Subclasses that override a visit method must either invoke the overridden | 17 * Subclasses that override a visit method must either invoke the overridden |
| 18 * visit method or explicitly invoke the more general visit method. Failure to | 18 * visit method or explicitly invoke the more general visit method. Failure to |
| 19 * do so will cause the visit methods for superclasses of the node to not be | 19 * do so will cause the visit methods for superclasses of the node to not be |
| (...skipping 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1875 * Initialize a newly created visitor to help the [outerVisitor]. | 1875 * Initialize a newly created visitor to help the [outerVisitor]. |
| 1876 */ | 1876 */ |
| 1877 _BreadthFirstChildVisitor(this.outerVisitor); | 1877 _BreadthFirstChildVisitor(this.outerVisitor); |
| 1878 | 1878 |
| 1879 @override | 1879 @override |
| 1880 Object visitNode(AstNode node) { | 1880 Object visitNode(AstNode node) { |
| 1881 outerVisitor._queue.add(node); | 1881 outerVisitor._queue.add(node); |
| 1882 return null; | 1882 return null; |
| 1883 } | 1883 } |
| 1884 } | 1884 } |
| OLD | NEW |