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

Side by Side Diff: pkg/analyzer/lib/dart/ast/visitor.dart

Issue 1594313002: Create a public interface for AST nodes and rename the implementation classes (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « pkg/analyzer/lib/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/generated/ast.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/generated/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698