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

Side by Side Diff: pkg/fasta/bin/run.dart

Issue 2627023005: Fasta scripts. (Closed)
Patch Set: Address comments. 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 unified diff | Download patch
« no previous file with comments | « pkg/fasta/bin/outline.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import 'dart:io' show
6 exit,
7 exitCode;
8
9 import 'package:fasta/src/ast_kind.dart' show
10 AstKind;
11
12 import 'package:fasta/src/compiler_command_line.dart' show
13 CompilerCommandLine;
14
15 import 'package:fasta/src/outline.dart' show
16 doCompile,
17 parseArguments;
18
19 import 'package:fasta/src/errors.dart' show
20 InputError;
21
22 import 'package:fasta/src/run.dart' show
23 run;
24
25 import 'package:fasta/src/ticker.dart' show
26 Ticker;
27
28 const int iterations = const int.fromEnvironment("iterations", defaultValue: 1);
29
30 main(List<String> arguments) async {
31 Uri uri;
32 CompilerCommandLine cl;
33 for (int i = 0; i < iterations; i++) {
34 if (i > 0) {
35 print("\n");
36 }
37 try {
38 cl = parseArguments("run", arguments);
39 uri =
40 await doCompile(cl, new Ticker(isVerbose:cl.verbose), AstKind.Kernel);
41 } on InputError catch (e) {
42 print(e.format());
43 exit(1);
44 }
45 if (exitCode != 0) exit(exitCode);
46 }
47 exit(await run(uri, cl));
48 }
OLDNEW
« no previous file with comments | « pkg/fasta/bin/outline.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698