OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 /// Command line tool to run the checker on a Dart program. | 6 /// Command line tool to run the checker on a Dart program. |
7 library dev_compiler.bin.checker; | 7 library dev_compiler.bin.checker; |
8 | 8 |
9 import 'dart:io'; | 9 import 'dart:io'; |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 print('Could not automatically find dart sdk path.'); | 27 print('Could not automatically find dart sdk path.'); |
28 print('Please pass in explicitly: --dart-sdk <path>'); | 28 print('Please pass in explicitly: --dart-sdk <path>'); |
29 exit(1); | 29 exit(1); |
30 } | 30 } |
31 | 31 |
32 if (options.entryPointFile == null) { | 32 if (options.entryPointFile == null) { |
33 print('Expected filename.'); | 33 print('Expected filename.'); |
34 _showUsageAndExit(); | 34 _showUsageAndExit(); |
35 } | 35 } |
36 | 36 |
37 if (!options.dumpInfo) setupLogger(options.logLevel, print); | 37 setupLogger(options.logLevel, print); |
38 | 38 |
39 if (options.serverMode) { | 39 if (options.serverMode) { |
40 new CompilerServer(options).start(); | 40 new CompilerServer(options).start(); |
41 } else { | 41 } else { |
42 var result = new Compiler(options).run(); | 42 var result = new Compiler(options).run(); |
43 exit(result.failure ? 1 : 0); | 43 exit(result.failure ? 1 : 0); |
44 } | 44 } |
45 } | 45 } |
OLD | NEW |