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

Unified Diff: pkg/fasta/lib/src/target.dart

Issue 2634453004: Fasta infrastructure. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: pkg/fasta/lib/src/target.dart
diff --git a/pkg/fasta/lib/src/target.dart b/pkg/fasta/lib/src/target.dart
new file mode 100644
index 0000000000000000000000000000000000000000..6c8c8245ccb76559b4ccaa9049ccebcd1d8ab31f
--- /dev/null
+++ b/pkg/fasta/lib/src/target.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library fasta.target;
+
+import 'dart:async' show
+ Future;
+
+import 'ticker.dart' show
+ Ticker;
+
+import 'ast_kind.dart' show
+ AstKind;
+
+/// A compilation target.
+///
+/// A target reads source files with [read] and writes out the resulting
+/// program when [writeOutline] is called.
+abstract class Target {
+ final Ticker ticker;
+
+ Target(this.ticker);
+
+ /// Instructs this target to include [uri] in its result.
+ void read(Uri uri);
+
+ /// Write the resulting program in the file [uri].
+ Future writeProgram(Uri uri, AstKind astKind);
+
+ /// Write the resulting outline in the file [uri].
+ Future writeOutline(Uri uri);
+}

Powered by Google App Engine
This is Rietveld 408576698