OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart2js.cmdline; | 5 library dart2js.cmdline; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 import 'dart:math' as math; | 9 import 'dart:math' as math; |
10 | 10 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 new OptionHandler('--analyze-all', passThrough), | 255 new OptionHandler('--analyze-all', passThrough), |
256 new OptionHandler('--analyze-only', setAnalyzeOnly), | 256 new OptionHandler('--analyze-only', setAnalyzeOnly), |
257 new OptionHandler('--analyze-signatures-only', passThrough), | 257 new OptionHandler('--analyze-signatures-only', passThrough), |
258 new OptionHandler('--disable-native-live-type-analysis', passThrough), | 258 new OptionHandler('--disable-native-live-type-analysis', passThrough), |
259 new OptionHandler('--reject-deprecated-language-features', passThrough), | 259 new OptionHandler('--reject-deprecated-language-features', passThrough), |
260 new OptionHandler('--report-sdk-use-of-deprecated-language-features', | 260 new OptionHandler('--report-sdk-use-of-deprecated-language-features', |
261 passThrough), | 261 passThrough), |
262 new OptionHandler('--categories=.*', setCategories), | 262 new OptionHandler('--categories=.*', setCategories), |
263 new OptionHandler('--global-js-name=.*', checkGlobalName), | 263 new OptionHandler('--global-js-name=.*', checkGlobalName), |
264 new OptionHandler('--disable-type-inference', passThrough), | 264 new OptionHandler('--disable-type-inference', passThrough), |
| 265 new OptionHandler('--terse', passThrough), |
265 | 266 |
266 // The following two options must come last. | 267 // The following two options must come last. |
267 new OptionHandler('-.*', (String argument) { | 268 new OptionHandler('-.*', (String argument) { |
268 helpAndFail('Error: Unknown option "$argument".'); | 269 helpAndFail('Error: Unknown option "$argument".'); |
269 }), | 270 }), |
270 new OptionHandler('.*', (String argument) { | 271 new OptionHandler('.*', (String argument) { |
271 arguments.add(nativeToUriPath(argument)); | 272 arguments.add(nativeToUriPath(argument)); |
272 }) | 273 }) |
273 ]; | 274 ]; |
274 | 275 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 | 497 |
497 --suppress-warnings | 498 --suppress-warnings |
498 Do not display any warnings. | 499 Do not display any warnings. |
499 | 500 |
500 --suppress-hints | 501 --suppress-hints |
501 Do not display any hints. | 502 Do not display any hints. |
502 | 503 |
503 --enable-diagnostic-colors | 504 --enable-diagnostic-colors |
504 Add colors to diagnostic messages. | 505 Add colors to diagnostic messages. |
505 | 506 |
| 507 --terse |
| 508 Emit diagnostics without suggestions for how to get rid of the diagnosed |
| 509 problems. |
| 510 |
506 The following options are only used for compiler development and may | 511 The following options are only used for compiler development and may |
507 be removed in a future version: | 512 be removed in a future version: |
508 | 513 |
509 --output-type=dart | 514 --output-type=dart |
510 Output Dart code instead of JavaScript. | 515 Output Dart code instead of JavaScript. |
511 | 516 |
512 --throw-on-error | 517 --throw-on-error |
513 Throw an exception if a compile-time error is detected. | 518 Throw an exception if a compile-time error is detected. |
514 | 519 |
515 --library-root=<directory> | 520 --library-root=<directory> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 print(trace); | 594 print(trace); |
590 } finally { | 595 } finally { |
591 exit(253); // 253 is recognized as a crash by our test scripts. | 596 exit(253); // 253 is recognized as a crash by our test scripts. |
592 } | 597 } |
593 } | 598 } |
594 } | 599 } |
595 | 600 |
596 void main() { | 601 void main() { |
597 mainWithErrorHandler(new Options()); | 602 mainWithErrorHandler(new Options()); |
598 } | 603 } |
OLD | NEW |