| OLD | NEW |
| (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 /// Defines a front-end API for converting source code to resolved ASTs. | |
| 6 /// | |
| 7 /// Note: this entire library is deprecated. It is provided as a migration path | |
| 8 /// until dev_compiler supports Dart Kernel. Once dev_compiler has been | |
| 9 /// converted to use Dart Kernel, this functionality will be removed. | |
| 10 @deprecated | |
| 11 library front_end.resolved_ast_generator; | |
| 12 | |
| 13 import 'dart:async'; | |
| 14 import 'compiler_options.dart'; | |
| 15 import 'package:analyzer/dart/ast/ast.dart' show CompilationUnit; | |
| 16 import 'package:analyzer/dart/element/element.dart' show LibraryElement; | |
| 17 | |
| 18 /// Processes the build unit whose source files are in [sources]. | |
| 19 /// | |
| 20 /// Intended for modular compilation. | |
| 21 /// | |
| 22 /// [sources] should be the complete set of source files for a build unit | |
| 23 /// (including both library and part files). All of the library files are | |
| 24 /// compiled to resolved ASTs. | |
| 25 /// | |
| 26 /// The compilation process is hermetic, meaning that the only files which will | |
| 27 /// be read are those listed in [sources], [CompilerOptions.inputSummaries], and | |
| 28 /// [CompilerOptions.sdkSummary]. If a source file attempts to refer to a file | |
| 29 /// which is not obtainable from these paths, that will result in an error, even | |
| 30 /// if the file exists on the filesystem. | |
| 31 /// | |
| 32 /// Any `part` declarations found in [sources] must refer to part files which | |
| 33 /// are also listed in [sources], otherwise an error results. (It is not | |
| 34 /// permitted to refer to a part file declared in another build unit). | |
| 35 @deprecated | |
| 36 Future<ResolvedAsts> resolvedAstsFor( | |
| 37 List<Uri> sources, CompilerOptions options) => | |
| 38 throw new UnimplementedError(); | |
| 39 | |
| 40 /// Representation of the resolved ASTs of a build unit. | |
| 41 /// | |
| 42 /// Not intended to be implemented or extended by clients. | |
| 43 @deprecated | |
| 44 abstract class ResolvedAsts { | |
| 45 /// The resolved ASTs of the build unit's source libraries. | |
| 46 /// | |
| 47 /// There is one sub-list per source library; each sub-list consists of the | |
| 48 /// resolved AST for the library's defining compilation unit, followed by the | |
| 49 /// resolved ASTs for any of the library's part files. | |
| 50 List<List<CompilationUnit>> get compilationUnits; | |
| 51 | |
| 52 /// Given a [LibraryElement] referred to by [compilationUnits], determine the | |
| 53 /// path to the summary that the library originated from. If the | |
| 54 /// [LibraryElement] did not originate from a summary (i.e. because it | |
| 55 /// originated from one of the source files of *this* build unit), return | |
| 56 /// `null`. | |
| 57 /// | |
| 58 /// This can be used by the client to determine which build unit any | |
| 59 /// referenced element originated from. | |
| 60 String getOriginatingSummary(LibraryElement element); | |
| 61 } | |
| OLD | NEW |