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

Side by Side Diff: pkg/front_end/lib/src/fasta/run.dart

Issue 2704753002: Implement line and column numbers. (Closed)
Patch Set: Undo whitespace change. Created 3 years, 10 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
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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 library fasta.run; 5 library fasta.run;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 Future; 8 Future;
9 9
10 import 'dart:io' show 10 import 'dart:io' show
11 stdout; 11 stdout;
12 12
13 import 'package:testing/testing.dart' show 13 import 'package:testing/testing.dart' show
14 StdioProcess; 14 StdioProcess;
15 15
16 import 'testing/kernel_chain.dart' show 16 import 'testing/kernel_chain.dart' show
17 computeDartVm, 17 computeDartVm,
18 computePatchedSdk; 18 computePatchedSdk;
19 19
20 import 'compiler_command_line.dart' show 20 import 'compiler_context.dart' show
21 CompilerCommandLine; 21 CompilerContext;
22 22
23 Future<int> run(Uri uri, CompilerCommandLine cl) async { 23 Future<int> run(Uri uri, CompilerContext c) async {
24 Uri sdk = await computePatchedSdk(); 24 Uri sdk = await computePatchedSdk();
25 Uri dartVm = computeDartVm(sdk); 25 Uri dartVm = computeDartVm(sdk);
26 List<String> arguments = <String>["${uri.toFilePath()}"] 26 List<String> arguments = <String>["${uri.toFilePath()}"]
27 ..addAll(cl.arguments.skip(1)); 27 ..addAll(c.options.arguments.skip(1));
28 if (cl.verbose) { 28 if (c.options.verbose) {
29 print("Running ${dartVm.toFilePath()} ${arguments.join(' ')}"); 29 print("Running ${dartVm.toFilePath()} ${arguments.join(' ')}");
30 } 30 }
31 StdioProcess result = await StdioProcess.run(dartVm.toFilePath(), arguments); 31 StdioProcess result = await StdioProcess.run(dartVm.toFilePath(), arguments);
32 stdout.write(result.output); 32 stdout.write(result.output);
33 return result.exitCode; 33 return result.exitCode;
34 } 34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698