| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 List<OptionHandler> handlers = <OptionHandler>[ | 119 List<OptionHandler> handlers = <OptionHandler>[ |
| 120 new OptionHandler('-[chv?]+', handleShortOptions), | 120 new OptionHandler('-[chv?]+', handleShortOptions), |
| 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('--force-cut-declaration-types', passThrough), |
| 130 // TODO(ahe): Remove the --no-colors option. | 130 // TODO(ahe): Remove the --no-colors option. |
| 131 new OptionHandler('--disable-diagnostic-colors', (_) => enableColors = false
), | 131 new OptionHandler('--disable-diagnostic-colors', (_) => enableColors = false
), |
| 132 new OptionHandler('--enable-diagnostic-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".'); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |