Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1153)

Side by Side Diff: pkg/front_end/lib/resolved_ast_generator.dart

Issue 2417043003: Initial API for the Dart front_end package. (Closed)
Patch Set: Fixes Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 '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 Dart Kernel objects.
scheglov 2016/10/16 21:19:39 I think we don't produce Kernel objects here.
Paul Berry 2016/10/17 12:54:39 Fixed, thanks.
25 ///
26 /// The compilation process is hermetic, meaning that the only files which will
27 /// be read are those listed in [sources], [Options.inputSummaries], and
28 /// [Options.sdkSummary]. If a source file attempts to refer to a file which is
29 /// not obtainable from these paths, that will result in an error, even if the
30 /// 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).
scheglov 2016/10/16 21:19:39 I think we have already told about library and par
Paul Berry 2016/10/17 12:54:39 Acknowledged. However, as I read it, the third pa
35 @deprecated
36 Future<ResolvedAsts> resolveBuildUnit(Options options, List<Uri> sources) =>
37 throw new UnimplementedError();
38
39 /// Representation of the resolved ASTs of a build unit.
40 @deprecated
41 abstract class ResolvedAsts {
42 /// The resolved ASTs of the build unit's source libraries.
43 ///
44 /// There is one sub-list per source library; each sub-list consists of the
45 /// resolved AST for the library's defining compilation unit, followed by the
46 /// resolved ASTs for any of the library's part files.
47 final List<List<CompilationUnit>> compilationUnits;
48
49 /// Given a [LibraryElement] referred to by [compilationUnits], determine the
50 /// path to the summary that the library originated from. If the
51 /// [LibraryElement] did not originate from a summary (i.e. because it
52 /// originated from one of the source files of *this* build unit), return
53 /// `null`.
54 ///
55 /// This can be used by the client to determine which build unit any
56 /// referenced element originated from.
57 String getOriginatingSummary(LibraryElement element);
58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698