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

Side by Side Diff: packages/analyzer/lib/src/dart/element/utilities.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 4 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library analyzer.src.dart.element.utilities;
6
7 import 'dart:collection';
8
9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/dart/element/visitor.dart';
11
12 /**
13 * A visitor that can be used to collect all of the non-synthetic elements in an
14 * element model.
15 */
16 class ElementGatherer extends GeneralizingElementVisitor {
17 /**
18 * The set in which the elements are collected.
19 */
20 final Set<Element> elements = new HashSet<Element>();
21
22 /**
23 * Initialize the visitor.
24 */
25 ElementGatherer();
26
27 @override
28 void visitElement(Element element) {
29 if (!element.isSynthetic) {
30 elements.add(element);
31 }
32 super.visitElement(element);
33 }
34 }
OLDNEW
« no previous file with comments | « packages/analyzer/lib/src/dart/element/type.dart ('k') | packages/analyzer/lib/src/dart/error/syntactic_errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698