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

Side by Side Diff: pkg/analysis_server/lib/src/services/search/element_visitors.dart

Issue 2894883002: Remove more libraries directives from server (Closed)
Patch Set: Created 3 years, 7 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
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 services.search.element_visitors;
6
7 import 'package:analyzer/dart/element/element.dart'; 5 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/dart/element/visitor.dart'; 6 import 'package:analyzer/dart/element/visitor.dart';
9 7
10 /** 8 /**
11 * Uses [processor] to visit all of the children of [element]. 9 * Uses [processor] to visit all of the children of [element].
12 * If [processor] returns `true`, then children of a child are visited too. 10 * If [processor] returns `true`, then children of a child are visited too.
13 */ 11 */
14 void visitChildren(Element element, ElementProcessor processor) { 12 void visitChildren(Element element, ElementProcessor processor) {
15 element.visitChildren(new _ElementVisitorAdapter(processor)); 13 element.visitChildren(new _ElementVisitorAdapter(processor));
16 } 14 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 54
57 @override 55 @override
58 void visitElement(Element element) { 56 void visitElement(Element element) {
59 if (element is CompilationUnitElement) { 57 if (element is CompilationUnitElement) {
60 element.visitChildren(this); 58 element.visitChildren(this);
61 } else { 59 } else {
62 processor(element); 60 processor(element);
63 } 61 }
64 } 62 }
65 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698