OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 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 | 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.analyzer_loader; | 5 library fasta.analyzer_loader; |
6 | 6 |
| 7 import 'package:front_end/physical_file_system.dart'; |
7 import 'package:kernel/ast.dart' show Program; | 8 import 'package:kernel/ast.dart' show Program; |
8 | 9 |
9 import 'package:front_end/src/fasta/builder/builder.dart' show LibraryBuilder; | 10 import 'package:front_end/src/fasta/builder/builder.dart' show LibraryBuilder; |
10 | 11 |
11 import 'package:front_end/src/fasta/target_implementation.dart' | 12 import 'package:front_end/src/fasta/target_implementation.dart' |
12 show TargetImplementation; | 13 show TargetImplementation; |
13 | 14 |
14 import 'package:front_end/src/fasta/source/source_class_builder.dart' | 15 import 'package:front_end/src/fasta/source/source_class_builder.dart' |
15 show SourceClassBuilder; | 16 show SourceClassBuilder; |
16 | 17 |
17 import 'package:front_end/src/fasta/source/source_loader.dart' | 18 import 'package:front_end/src/fasta/source/source_loader.dart' |
18 show SourceLoader; | 19 show SourceLoader; |
19 | 20 |
20 import 'package:analyzer/src/fasta/element_store.dart' show ElementStore; | 21 import 'package:analyzer/src/fasta/element_store.dart' show ElementStore; |
21 | 22 |
22 import 'analyzer_diet_listener.dart' show AnalyzerDietListener; | 23 import 'analyzer_diet_listener.dart' show AnalyzerDietListener; |
23 | 24 |
24 class AnalyzerLoader<L> extends SourceLoader<L> { | 25 class AnalyzerLoader<L> extends SourceLoader<L> { |
25 ElementStore elementStore; | 26 ElementStore elementStore; |
26 | 27 |
27 AnalyzerLoader(TargetImplementation target) : super(target); | 28 AnalyzerLoader(TargetImplementation target) |
| 29 : super(PhysicalFileSystem.instance, target); |
28 | 30 |
29 @override | 31 @override |
30 void computeHierarchy(Program program) { | 32 void computeHierarchy(Program program) { |
31 elementStore = new ElementStore(coreLibrary, builders); | 33 elementStore = new ElementStore(coreLibrary, builders); |
32 ticker.logMs("Built analyzer element model."); | 34 ticker.logMs("Built analyzer element model."); |
33 } | 35 } |
34 | 36 |
35 @override | 37 @override |
36 AnalyzerDietListener createDietListener(LibraryBuilder library) { | 38 AnalyzerDietListener createDietListener(LibraryBuilder library) { |
37 return new AnalyzerDietListener(library, elementStore); | 39 return new AnalyzerDietListener(library, elementStore); |
38 } | 40 } |
39 | 41 |
40 @override | 42 @override |
41 void checkOverrides(List<SourceClassBuilder> sourceClasses) { | 43 void checkOverrides(List<SourceClassBuilder> sourceClasses) { |
42 // Not implemented yet. Requires [hierarchy]. | 44 // Not implemented yet. Requires [hierarchy]. |
43 } | 45 } |
44 } | 46 } |
OLD | NEW |