| 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:convert' show UTF8, LineSplitter; | 9 import 'dart:convert' show UTF8, LineSplitter; |
| 10 import 'dart:io' | 10 import 'dart:io' |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 }), | 353 }), |
| 354 new OptionHandler('--enable-null-aware-operators', passThrough), | 354 new OptionHandler('--enable-null-aware-operators', passThrough), |
| 355 new OptionHandler('--enable-enum', (_) { | 355 new OptionHandler('--enable-enum', (_) { |
| 356 diagnosticHandler.info( | 356 diagnosticHandler.info( |
| 357 "Option '--enable-enum' is no longer needed. " | 357 "Option '--enable-enum' is no longer needed. " |
| 358 "Enums are supported by default.", | 358 "Enums are supported by default.", |
| 359 api.Diagnostic.HINT); | 359 api.Diagnostic.HINT); |
| 360 }), | 360 }), |
| 361 new OptionHandler('--allow-native-extensions', setAllowNativeExtensions), | 361 new OptionHandler('--allow-native-extensions', setAllowNativeExtensions), |
| 362 new OptionHandler('--generate-code-with-compile-time-errors', passThrough), | 362 new OptionHandler('--generate-code-with-compile-time-errors', passThrough), |
| 363 new OptionHandler('--test-mode', passThrough), |
| 363 | 364 |
| 364 // The following three options must come last. | 365 // The following three options must come last. |
| 365 new OptionHandler('-D.+=.*', addInEnvironment), | 366 new OptionHandler('-D.+=.*', addInEnvironment), |
| 366 new OptionHandler('-.*', (String argument) { | 367 new OptionHandler('-.*', (String argument) { |
| 367 helpAndFail("Unknown option '$argument'."); | 368 helpAndFail("Unknown option '$argument'."); |
| 368 }), | 369 }), |
| 369 new OptionHandler('.*', (String argument) { | 370 new OptionHandler('.*', (String argument) { |
| 370 arguments.add(nativeToUriPath(argument)); | 371 arguments.add(nativeToUriPath(argument)); |
| 371 }) | 372 }) |
| 372 ]; | 373 ]; |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 } else if (exitCode == 253) { | 745 } else if (exitCode == 253) { |
| 745 print(">>> TEST CRASH"); | 746 print(">>> TEST CRASH"); |
| 746 } else { | 747 } else { |
| 747 print(">>> TEST FAIL"); | 748 print(">>> TEST FAIL"); |
| 748 } | 749 } |
| 749 stderr.writeln(">>> EOF STDERR"); | 750 stderr.writeln(">>> EOF STDERR"); |
| 750 subscription.resume(); | 751 subscription.resume(); |
| 751 }); | 752 }); |
| 752 }); | 753 }); |
| 753 } | 754 } |
| OLD | NEW |