OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2017, 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.analyzer_loader; |
| 6 |
| 7 import 'package:kernel/ast.dart' show Program; |
| 8 |
| 9 import '../builder/builder.dart' show LibraryBuilder; |
| 10 |
| 11 import '../target_implementation.dart' show TargetImplementation; |
| 12 |
| 13 import '../source/source_loader.dart' show SourceLoader; |
| 14 |
| 15 import 'element_store.dart' show ElementStore; |
| 16 |
| 17 import 'analyzer_diet_listener.dart' show AnalyzerDietListener; |
| 18 |
| 19 class AnalyzerLoader<L> extends SourceLoader<L> { |
| 20 ElementStore elementStore; |
| 21 |
| 22 AnalyzerLoader(TargetImplementation target) : super(target); |
| 23 |
| 24 @override |
| 25 void computeHierarchy(Program program) { |
| 26 elementStore = new ElementStore(coreLibrary, builders); |
| 27 ticker.logMs("Built analyzer element model."); |
| 28 } |
| 29 |
| 30 @override |
| 31 AnalyzerDietListener createDietListener(LibraryBuilder library) { |
| 32 return new AnalyzerDietListener(library, elementStore); |
| 33 } |
| 34 } |
OLD | NEW |