| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 new OptionHandler('--library-root=.+', setLibraryRoot), | 137 new OptionHandler('--library-root=.+', setLibraryRoot), |
| 138 new OptionHandler('--out=.+|-o.+', setOutput), | 138 new OptionHandler('--out=.+|-o.+', setOutput), |
| 139 new OptionHandler('--allow-mock-compilation', passThrough), | 139 new OptionHandler('--allow-mock-compilation', passThrough), |
| 140 new OptionHandler('--minify', passThrough), | 140 new OptionHandler('--minify', passThrough), |
| 141 new OptionHandler('--force-cut-declaration-types', passThrough), | 141 new OptionHandler('--force-cut-declaration-types', passThrough), |
| 142 // TODO(ahe): Remove the --no-colors option. | 142 // TODO(ahe): Remove the --no-colors option. |
| 143 new OptionHandler('--disable-diagnostic-colors', (_) => enableColors = false
), | 143 new OptionHandler('--disable-diagnostic-colors', (_) => enableColors = false
), |
| 144 new OptionHandler('--enable-diagnostic-colors', (_) => enableColors = true), | 144 new OptionHandler('--enable-diagnostic-colors', (_) => enableColors = true), |
| 145 new OptionHandler('--enable[_-]checked[_-]mode|--checked', | 145 new OptionHandler('--enable[_-]checked[_-]mode|--checked', |
| 146 (_) => passThrough('--enable-checked-mode')), | 146 (_) => passThrough('--enable-checked-mode')), |
| 147 new OptionHandler(@'--help|/\?|/h', (_) => wantHelp = true), | 147 new OptionHandler(r'--help|/\?|/h', (_) => wantHelp = true), |
| 148 new OptionHandler(@'--package-root=.+|-p.+', setPackageRoot), | 148 new OptionHandler(r'--package-root=.+|-p.+', setPackageRoot), |
| 149 // The following two options must come last. | 149 // The following two options must come last. |
| 150 new OptionHandler('-.*', (String argument) { | 150 new OptionHandler('-.*', (String argument) { |
| 151 helpAndFail('Error: Unknown option "$argument".'); | 151 helpAndFail('Error: Unknown option "$argument".'); |
| 152 }), | 152 }), |
| 153 new OptionHandler('.*', (String argument) { | 153 new OptionHandler('.*', (String argument) { |
| 154 arguments.add(nativeToUriPath(argument)); | 154 arguments.add(nativeToUriPath(argument)); |
| 155 }) | 155 }) |
| 156 ]; | 156 ]; |
| 157 | 157 |
| 158 parseCommandLine(handlers, argv); | 158 parseCommandLine(handlers, argv); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 } catch (ignored) { | 400 } catch (ignored) { |
| 401 print('Internal error: error while printing exception'); | 401 print('Internal error: error while printing exception'); |
| 402 } | 402 } |
| 403 try { | 403 try { |
| 404 print(trace); | 404 print(trace); |
| 405 } finally { | 405 } finally { |
| 406 exit(253); // 253 is recognized as a crash by our test scripts. | 406 exit(253); // 253 is recognized as a crash by our test scripts. |
| 407 } | 407 } |
| 408 } | 408 } |
| 409 } | 409 } |
| OLD | NEW |