| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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'); | 5 #library('dart2js'); |
| 6 | 6 |
| 7 #import('dart:io'); | 7 #import('dart:io'); |
| 8 #import('dart:uri'); | 8 #import('dart:uri'); |
| 9 #import('dart:utf'); | 9 #import('dart:utf'); |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 new OptionHandler('--throw-on-error', (_) => throwOnError = true), | 121 new OptionHandler('--throw-on-error', (_) => throwOnError = true), |
| 122 new OptionHandler('--suppress-warnings', (_) => showWarnings = false), | 122 new OptionHandler('--suppress-warnings', (_) => showWarnings = false), |
| 123 new OptionHandler('--output-type=dart|--output-type=js', passThrough), | 123 new OptionHandler('--output-type=dart|--output-type=js', passThrough), |
| 124 new OptionHandler('--verbose', (_) => verbose = true), | 124 new OptionHandler('--verbose', (_) => verbose = true), |
| 125 new OptionHandler('--library-root=.+', setLibraryRoot), | 125 new OptionHandler('--library-root=.+', setLibraryRoot), |
| 126 new OptionHandler('--out=.+|-o.+', setOutput), | 126 new OptionHandler('--out=.+|-o.+', setOutput), |
| 127 new OptionHandler('--allow-mock-compilation', passThrough), | 127 new OptionHandler('--allow-mock-compilation', passThrough), |
| 128 new OptionHandler('--minify', passThrough), | 128 new OptionHandler('--minify', passThrough), |
| 129 new OptionHandler('--cut-declaration-types', passThrough), | 129 new OptionHandler('--cut-declaration-types', passThrough), |
| 130 // TODO(ahe): Remove the --no-colors option. | 130 // TODO(ahe): Remove the --no-colors option. |
| 131 new OptionHandler('--no-colors', (_) => enableColors = false), | 131 new OptionHandler('--disable-diagnostic-colors', (_) => enableColors = false
), |
| 132 new OptionHandler('--colors', (_) => enableColors = true), | 132 new OptionHandler('--enable-diagnostic-colors', (_) => enableColors = true), |
| 133 new OptionHandler('--enable[_-]checked[_-]mode|--checked', | 133 new OptionHandler('--enable[_-]checked[_-]mode|--checked', |
| 134 (_) => passThrough('--enable-checked-mode')), | 134 (_) => passThrough('--enable-checked-mode')), |
| 135 new OptionHandler(@'--help|/\?|/h', (_) => wantHelp = true), | 135 new OptionHandler(@'--help|/\?|/h', (_) => wantHelp = true), |
| 136 new OptionHandler(@'--package-root=.+|-p.+', setPackageRoot), | 136 new OptionHandler(@'--package-root=.+|-p.+', setPackageRoot), |
| 137 // The following two options must come last. | 137 // The following two options must come last. |
| 138 new OptionHandler('-.*', (String argument) { | 138 new OptionHandler('-.*', (String argument) { |
| 139 helpAndFail('Error: Unknown option "$argument".'); | 139 helpAndFail('Error: Unknown option "$argument".'); |
| 140 }), | 140 }), |
| 141 new OptionHandler('.*', (String argument) { | 141 new OptionHandler('.*', (String argument) { |
| 142 arguments.add(nativeToUriPath(argument)); | 142 arguments.add(nativeToUriPath(argument)); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 337 |
| 338 -p<path>, --package-root=<path> | 338 -p<path>, --package-root=<path> |
| 339 Where to find packages, that is, "package:..." imports. | 339 Where to find packages, that is, "package:..." imports. |
| 340 | 340 |
| 341 --minify | 341 --minify |
| 342 Generate minified output. | 342 Generate minified output. |
| 343 | 343 |
| 344 --suppress-warnings | 344 --suppress-warnings |
| 345 Do not display any warnings. | 345 Do not display any warnings. |
| 346 | 346 |
| 347 --colors | 347 --enable-diagnostic-colors |
| 348 Add colors to diagnostic messages. | 348 Add colors to diagnostic messages. |
| 349 | 349 |
| 350 The following options are only used for compiler development and may | 350 The following options are only used for compiler development and may |
| 351 be removed in a future version: | 351 be removed in a future version: |
| 352 | 352 |
| 353 --output-type=dart | 353 --output-type=dart |
| 354 Output Dart code instead of JavaScript. | 354 Output Dart code instead of JavaScript. |
| 355 | 355 |
| 356 --throw-on-error | 356 --throw-on-error |
| 357 Throw an exception if a compile-time error is detected. | 357 Throw an exception if a compile-time error is detected. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 388 } catch (ignored) { | 388 } catch (ignored) { |
| 389 print('Internal error: error while printing exception'); | 389 print('Internal error: error while printing exception'); |
| 390 } | 390 } |
| 391 try { | 391 try { |
| 392 print(trace); | 392 print(trace); |
| 393 } finally { | 393 } finally { |
| 394 exit(253); // 253 is recognized as a crash by our test scripts. | 394 exit(253); // 253 is recognized as a crash by our test scripts. |
| 395 } | 395 } |
| 396 } | 396 } |
| 397 } | 397 } |
| OLD | NEW |