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.target; | 5 library fasta.target; |
6 | 6 |
7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
8 | 8 |
| 9 import 'package:kernel/ast.dart'; |
9 import 'ticker.dart' show Ticker; | 10 import 'ticker.dart' show Ticker; |
10 | 11 |
11 /// A compilation target. | 12 /// A compilation target. |
12 /// | 13 /// |
13 /// A target reads source files with [read] and computes outlines when | 14 /// A target reads source files with [read], builds outlines when |
14 /// [computeOutline] is called. | 15 /// [buildOutlines] is called and builds the full program when [buildProgram] |
| 16 /// is called. |
15 abstract class Target { | 17 abstract class Target { |
16 final Ticker ticker; | 18 final Ticker ticker; |
17 | 19 |
18 Target(this.ticker); | 20 Target(this.ticker); |
19 | 21 |
20 /// Instructs this target to include [uri] in its result. | 22 /// Instructs this target to include [uri] in its result. |
21 void read(Uri uri); | 23 void read(Uri uri); |
22 | 24 |
23 /// Compute outlines for all [read] URIs. | 25 /// Build and return outlines for all libraries. |
24 Future<Null> computeOutline(); | 26 Future<Program> buildOutlines(); |
25 | 27 |
26 /// Write the resulting program in the file [uri]. | 28 /// Build and return the full program for all libraries. |
27 Future writeProgram(Uri uri); | 29 Future<Program> buildProgram(); |
28 } | 30 } |
OLD | NEW |