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

Side by Side Diff: pkg/fasta/lib/src/export.dart

Issue 2629063005: Fasta builders. (Closed)
Patch Set: Address review comments. Created 3 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/fasta/lib/src/combinator.dart ('k') | pkg/fasta/lib/src/import.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016, 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 fasta.export;
6
7 import 'builder/builder.dart' show
8 Builder,
9 LibraryBuilder;
10
11 import 'combinator.dart' show
12 Combinator;
13
14 class Export {
15 /// The library that is exporting [exported];
16 final LibraryBuilder exporter;
17
18 /// The library being exported.
19 final LibraryBuilder exported;
20
21 final List<Combinator> combinators;
22
23 Export(this.exporter, this.exported, this.combinators);
24
25 bool addToExportScope(String name, Builder member) {
26 if (combinators != null) {
27 for (Combinator combinator in combinators) {
28 if (combinator.isShow && !combinator.names.contains(name)) return false;
29 if (combinator.isHide && combinator.names.contains(name)) return false;
30 }
31 }
32 return exporter.addToExportScope(name, member);
33 }
34 }
OLDNEW
« no previous file with comments | « pkg/fasta/lib/src/combinator.dart ('k') | pkg/fasta/lib/src/import.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698