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 'ticker.dart' show Ticker; | 9 import 'ticker.dart' show Ticker; |
10 | 10 |
11 import 'ast_kind.dart' show AstKind; | |
12 | |
13 /// A compilation target. | 11 /// A compilation target. |
14 /// | 12 /// |
15 /// A target reads source files with [read] and writes out the resulting | 13 /// A target reads source files with [read] and writes out the resulting |
16 /// program when [writeOutline] is called. | 14 /// program when [writeOutline] is called. |
17 abstract class Target { | 15 abstract class Target { |
18 final Ticker ticker; | 16 final Ticker ticker; |
19 | 17 |
20 Target(this.ticker); | 18 Target(this.ticker); |
21 | 19 |
22 /// Instructs this target to include [uri] in its result. | 20 /// Instructs this target to include [uri] in its result. |
23 void read(Uri uri); | 21 void read(Uri uri); |
24 | 22 |
25 /// Write the resulting program in the file [uri]. | 23 /// Write the resulting program in the file [uri]. |
26 Future writeProgram(Uri uri, AstKind astKind); | 24 Future writeProgram(Uri uri); |
27 | 25 |
28 /// Write the resulting outline in the file [uri]. | 26 /// Write the resulting outline in the file [uri]. |
29 Future writeOutline(Uri uri); | 27 Future writeOutline(Uri uri); |
30 } | 28 } |
OLD | NEW |