| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 new OptionHandler('--library-root=.+', (String argument) { | 71 new OptionHandler('--library-root=.+', (String argument) { |
| 72 String path = nativeToUriPath(extractParameter(argument)); | 72 String path = nativeToUriPath(extractParameter(argument)); |
| 73 if (!path.endsWith("/")) path = "$path/"; | 73 if (!path.endsWith("/")) path = "$path/"; |
| 74 libraryRoot = cwd.resolve(path); | 74 libraryRoot = cwd.resolve(path); |
| 75 }), | 75 }), |
| 76 new OptionHandler('--out=.+|-o.+', (String argument) { | 76 new OptionHandler('--out=.+|-o.+', (String argument) { |
| 77 explicitOut = true; | 77 explicitOut = true; |
| 78 out = cwd.resolve(nativeToUriPath(extractParameter(argument))); | 78 out = cwd.resolve(nativeToUriPath(extractParameter(argument))); |
| 79 }), | 79 }), |
| 80 new OptionHandler('--allow-mock-compilation', passThrough), | 80 new OptionHandler('--allow-mock-compilation', passThrough), |
| 81 new OptionHandler('--unparse-validation', passThrough), |
| 81 new OptionHandler('--no-colors', (_) => colors.enabled = false), | 82 new OptionHandler('--no-colors', (_) => colors.enabled = false), |
| 82 new OptionHandler('--enable[_-]checked[_-]mode|--checked|-c', | 83 new OptionHandler('--enable[_-]checked[_-]mode|--checked|-c', |
| 83 (_) => passThrough('--enable-checked-mode')), | 84 (_) => passThrough('--enable-checked-mode')), |
| 84 new OptionHandler(@'--help|-h|/\?|/h', (_) => wantHelp = true), | 85 new OptionHandler(@'--help|-h|/\?|/h', (_) => wantHelp = true), |
| 85 // The following two options must come last. | 86 // The following two options must come last. |
| 86 new OptionHandler('-.*', (String argument) { | 87 new OptionHandler('-.*', (String argument) { |
| 87 helpAndFail('Error: Unknown option "$argument".'); | 88 helpAndFail('Error: Unknown option "$argument".'); |
| 88 }), | 89 }), |
| 89 new OptionHandler('.*', (String argument) { | 90 new OptionHandler('.*', (String argument) { |
| 90 arguments.add(nativeToUriPath(argument)); | 91 arguments.add(nativeToUriPath(argument)); |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 } catch (var ignored) { | 287 } catch (var ignored) { |
| 287 print('Internal error: error while printing exception'); | 288 print('Internal error: error while printing exception'); |
| 288 } | 289 } |
| 289 try { | 290 try { |
| 290 print(trace); | 291 print(trace); |
| 291 } finally { | 292 } finally { |
| 292 exit(253); // 253 is recognized as a crash by our test scripts. | 293 exit(253); // 253 is recognized as a crash by our test scripts. |
| 293 } | 294 } |
| 294 } | 295 } |
| 295 } | 296 } |
| OLD | NEW |