| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 fasta.compiler_command_line; | 5 library fasta.compiler_command_line; |
| 6 | 6 |
| 7 import 'dart:io' show | 7 import 'dart:io' show |
| 8 exit; | 8 exit; |
| 9 | 9 |
| 10 import 'command_line.dart' show | 10 import 'command_line.dart' show |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 Uri get platform { | 67 Uri get platform { |
| 68 return options.containsKey("--compile-sdk") | 68 return options.containsKey("--compile-sdk") |
| 69 ? null | 69 ? null |
| 70 : options["--platform"] ?? Uri.base.resolve("platform.dill"); | 70 : options["--platform"] ?? Uri.base.resolve("platform.dill"); |
| 71 } | 71 } |
| 72 | 72 |
| 73 Set<String> get fatal { | 73 Set<String> get fatal { |
| 74 return new Set<String>.from(options["--fatal"] ?? <String>[]); | 74 return new Set<String>.from(options["--fatal"] ?? <String>[]); |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool get areErrorsFatal => fatal.contains("errors"); | 77 bool get errorsAreFatal => fatal.contains("errors"); |
| 78 | 78 |
| 79 bool get areWarningsFatal => fatal.contains("warnings"); | 79 bool get warningsAreFatal => fatal.contains("warnings"); |
| 80 | 80 |
| 81 bool get areNitsFatal => fatal.contains("nits"); | 81 bool get nitsAreFatal => fatal.contains("nits"); |
| 82 | 82 |
| 83 static dynamic withGlobalOptions(String programName, List<String> arguments, | 83 static dynamic withGlobalOptions(String programName, List<String> arguments, |
| 84 dynamic f(CompilerContext context)) { | 84 dynamic f(CompilerContext context)) { |
| 85 return CompilerContext.withGlobalOptions( | 85 return CompilerContext.withGlobalOptions( |
| 86 new CompilerCommandLine(programName, arguments), f); | 86 new CompilerCommandLine(programName, arguments), f); |
| 87 } | 87 } |
| 88 | 88 |
| 89 static CompilerCommandLine forRootContext() { | 89 static CompilerCommandLine forRootContext() { |
| 90 return new CompilerCommandLine("", [""]); | 90 return new CompilerCommandLine("", [""]); |
| 91 } | 91 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 Compile the SDK from scratch instead of reading it from 'platform.dill'. | 166 Compile the SDK from scratch instead of reading it from 'platform.dill'. |
| 167 | 167 |
| 168 --fatal=errors | 168 --fatal=errors |
| 169 --fatal=warnings | 169 --fatal=warnings |
| 170 --fatal=nits | 170 --fatal=nits |
| 171 Makes messages of the given kinds fatal, that is, immediately stop the | 171 Makes messages of the given kinds fatal, that is, immediately stop the |
| 172 compiler with a non-zero exit-code. In --verbose mode, also display an | 172 compiler with a non-zero exit-code. In --verbose mode, also display an |
| 173 internal stack trace from the compiler. Multiple kinds can be separated by | 173 internal stack trace from the compiler. Multiple kinds can be separated by |
| 174 commas, for example, --fatal=errors,warnings. | 174 commas, for example, --fatal=errors,warnings. |
| 175 """; | 175 """; |
| OLD | NEW |