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 exit; | 7 import 'dart:io' show exit; |
8 | 8 |
9 import 'command_line.dart' show CommandLine, argumentError; | 9 import 'command_line.dart' show CommandLine, argumentError; |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 Set<String> get fatal { | 76 Set<String> get fatal { |
77 return new Set<String>.from(options["--fatal"] ?? <String>[]); | 77 return new Set<String>.from(options["--fatal"] ?? <String>[]); |
78 } | 78 } |
79 | 79 |
80 bool get errorsAreFatal => fatal.contains("errors"); | 80 bool get errorsAreFatal => fatal.contains("errors"); |
81 | 81 |
82 bool get warningsAreFatal => fatal.contains("warnings"); | 82 bool get warningsAreFatal => fatal.contains("warnings"); |
83 | 83 |
84 bool get nitsAreFatal => fatal.contains("nits"); | 84 bool get nitsAreFatal => fatal.contains("nits"); |
85 | 85 |
| 86 bool get strongMode => options.containsKey("--strong-mode"); |
| 87 |
86 static dynamic withGlobalOptions(String programName, List<String> arguments, | 88 static dynamic withGlobalOptions(String programName, List<String> arguments, |
87 dynamic f(CompilerContext context)) { | 89 dynamic f(CompilerContext context)) { |
88 return CompilerContext.withGlobalOptions( | 90 return CompilerContext.withGlobalOptions( |
89 new CompilerCommandLine(programName, arguments), f); | 91 new CompilerCommandLine(programName, arguments), f); |
90 } | 92 } |
91 | 93 |
92 static CompilerCommandLine forRootContext() { | 94 static CompilerCommandLine forRootContext() { |
93 return new CompilerCommandLine("", [""]); | 95 return new CompilerCommandLine("", [""]); |
94 } | 96 } |
95 } | 97 } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 Compile the SDK from scratch instead of reading it from 'platform.dill'. | 178 Compile the SDK from scratch instead of reading it from 'platform.dill'. |
177 | 179 |
178 --fatal=errors | 180 --fatal=errors |
179 --fatal=warnings | 181 --fatal=warnings |
180 --fatal=nits | 182 --fatal=nits |
181 Makes messages of the given kinds fatal, that is, immediately stop the | 183 Makes messages of the given kinds fatal, that is, immediately stop the |
182 compiler with a non-zero exit-code. In --verbose mode, also display an | 184 compiler with a non-zero exit-code. In --verbose mode, also display an |
183 internal stack trace from the compiler. Multiple kinds can be separated by | 185 internal stack trace from the compiler. Multiple kinds can be separated by |
184 commas, for example, --fatal=errors,warnings. | 186 commas, for example, --fatal=errors,warnings. |
185 """; | 187 """; |
OLD | NEW |