| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 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 | 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 fasta.export; | 5 library fasta.export; |
| 6 | 6 |
| 7 import 'builder/builder.dart' show Builder, LibraryBuilder; | 7 import 'builder/builder.dart' show Builder, LibraryBuilder; |
| 8 | 8 |
| 9 import 'combinator.dart' show Combinator; | 9 import 'combinator.dart' show Combinator; |
| 10 | 10 |
| 11 class Export { | 11 class Export { |
| 12 /// The library that is exporting [exported]; | 12 /// The library that is exporting [exported]; |
| 13 final LibraryBuilder exporter; | 13 final LibraryBuilder exporter; |
| 14 | 14 |
| 15 /// The library being exported. | 15 /// The library being exported. |
| 16 final LibraryBuilder exported; | 16 final LibraryBuilder exported; |
| 17 | 17 |
| 18 final List<Combinator> combinators; | 18 final List<Combinator> combinators; |
| 19 | 19 |
| 20 Export(this.exporter, this.exported, this.combinators, int charOffset); | 20 final int charOffset; |
| 21 |
| 22 Export(this.exporter, this.exported, this.combinators, this.charOffset); |
| 21 | 23 |
| 22 Uri get fileUri => exporter.fileUri; | 24 Uri get fileUri => exporter.fileUri; |
| 23 | 25 |
| 24 bool addToExportScope(String name, Builder member) { | 26 bool addToExportScope(String name, Builder member) { |
| 25 if (combinators != null) { | 27 if (combinators != null) { |
| 26 for (Combinator combinator in combinators) { | 28 for (Combinator combinator in combinators) { |
| 27 if (combinator.isShow && !combinator.names.contains(name)) return false; | 29 if (combinator.isShow && !combinator.names.contains(name)) return false; |
| 28 if (combinator.isHide && combinator.names.contains(name)) return false; | 30 if (combinator.isHide && combinator.names.contains(name)) return false; |
| 29 } | 31 } |
| 30 } | 32 } |
| 31 return exporter.addToExportScope(name, member); | 33 return exporter.addToExportScope(name, member); |
| 32 } | 34 } |
| 33 } | 35 } |
| OLD | NEW |