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