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 show Future, EventSink; | 8 show Future, EventSink; |
9 import 'dart:io' | 9 import 'dart:io' |
10 show exit, File, FileMode, Platform, RandomAccessFile, FileSystemException; | 10 show exit, File, FileMode, Platform, RandomAccessFile, FileSystemException; |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 new OptionHandler('--analyze-all', passThrough), | 272 new OptionHandler('--analyze-all', passThrough), |
273 new OptionHandler('--analyze-only', setAnalyzeOnly), | 273 new OptionHandler('--analyze-only', setAnalyzeOnly), |
274 new OptionHandler('--analyze-signatures-only', passThrough), | 274 new OptionHandler('--analyze-signatures-only', passThrough), |
275 new OptionHandler('--disable-native-live-type-analysis', passThrough), | 275 new OptionHandler('--disable-native-live-type-analysis', passThrough), |
276 new OptionHandler('--categories=.*', setCategories), | 276 new OptionHandler('--categories=.*', setCategories), |
277 new OptionHandler('--disable-type-inference', passThrough), | 277 new OptionHandler('--disable-type-inference', passThrough), |
278 new OptionHandler('--terse', passThrough), | 278 new OptionHandler('--terse', passThrough), |
279 new OptionHandler('--dump-info', passThrough), | 279 new OptionHandler('--dump-info', passThrough), |
280 new OptionHandler('--disallow-unsafe-eval', | 280 new OptionHandler('--disallow-unsafe-eval', |
281 (_) => hasDisallowUnsafeEval = true), | 281 (_) => hasDisallowUnsafeEval = true), |
| 282 new OptionHandler('--hide-package-warnings', passThrough), |
282 new OptionHandler('-D.+=.*', addInEnvironment), | 283 new OptionHandler('-D.+=.*', addInEnvironment), |
283 | 284 |
284 // The following two options must come last. | 285 // The following two options must come last. |
285 new OptionHandler('-.*', (String argument) { | 286 new OptionHandler('-.*', (String argument) { |
286 helpAndFail('Error: Unknown option "$argument".'); | 287 helpAndFail('Error: Unknown option "$argument".'); |
287 }), | 288 }), |
288 new OptionHandler('.*', (String argument) { | 289 new OptionHandler('.*', (String argument) { |
289 arguments.add(nativeToUriPath(argument)); | 290 arguments.add(nativeToUriPath(argument)); |
290 }) | 291 }) |
291 ]; | 292 ]; |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 --suppress-hints | 551 --suppress-hints |
551 Do not display any hints. | 552 Do not display any hints. |
552 | 553 |
553 --enable-diagnostic-colors | 554 --enable-diagnostic-colors |
554 Add colors to diagnostic messages. | 555 Add colors to diagnostic messages. |
555 | 556 |
556 --terse | 557 --terse |
557 Emit diagnostics without suggestions for how to get rid of the diagnosed | 558 Emit diagnostics without suggestions for how to get rid of the diagnosed |
558 problems. | 559 problems. |
559 | 560 |
| 561 --hide-package-warnings |
| 562 Hide warnings and hints generated from packages. |
| 563 |
560 The following options are only used for compiler development and may | 564 The following options are only used for compiler development and may |
561 be removed in a future version: | 565 be removed in a future version: |
562 | 566 |
563 --output-type=dart | 567 --output-type=dart |
564 Output Dart code instead of JavaScript. | 568 Output Dart code instead of JavaScript. |
565 | 569 |
566 --throw-on-error | 570 --throw-on-error |
567 Throw an exception if a compile-time error is detected. | 571 Throw an exception if a compile-time error is detected. |
568 | 572 |
569 --library-root=<directory> | 573 --library-root=<directory> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 } | 642 } |
639 } | 643 } |
640 | 644 |
641 try { | 645 try { |
642 return compilerMain(arguments).catchError(onError); | 646 return compilerMain(arguments).catchError(onError); |
643 } catch (exception, trace) { | 647 } catch (exception, trace) { |
644 onError(exception, trace); | 648 onError(exception, trace); |
645 return new Future.value(); | 649 return new Future.value(); |
646 } | 650 } |
647 } | 651 } |
OLD | NEW |