Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: lib/src/options.dart

Issue 2408333006: Add support for not generating a .dill file. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/src/rastask.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/options.dart
diff --git a/lib/src/options.dart b/lib/src/options.dart
index 9deb2f6e1c6e4696c155ea6aad1703018b492635..e2e92dc321ca67da9038805dd32419a7f5a972f9 100644
--- a/lib/src/options.dart
+++ b/lib/src/options.dart
@@ -31,6 +31,8 @@ const Map<String, OptionDescription> descriptions =
Option.throwOnError, hasOptionalArgument: true),
"--analyze": const OptionDescription(Option.analyze),
+
+ "--no-output": const OptionDescription(Option.noOutput),
};
const List<Option> supportedBatchOptions = const <Option>[
@@ -76,6 +78,9 @@ enum Option {
/// `--analyze`.
analyze,
+ /// `--no-output`.
+ noOutput,
+
// `--` which signals option parsing should end (the rest are arguments).
skip,
@@ -111,11 +116,13 @@ class Options {
final bool throwOnError;
final int throwOnErrorCount;
final bool analyze;
+ final bool noOutput;
Options(this.input, this.output,
{this.dependenciesFile, this.targetSpecification,
this.generateLibrary, this.isVerbose, this.isBatch, this.pattern,
- this.throwOnError, this.throwOnErrorCount, this.analyze});
+ this.throwOnError, this.throwOnErrorCount, this.analyze,
+ this.noOutput});
}
class OptionParser {
@@ -139,6 +146,7 @@ class OptionParser {
Uri targetSpecification;
List<String> uris = <String>[];
Pattern pattern;
+ bool noOutput;
for (OptionValue value in values) {
switch (value.option) {
case Option.library:
@@ -182,6 +190,10 @@ class OptionParser {
analyze = true;
break;
+ case Option.noOutput:
+ noOutput = true;
+ break;
+
case Option.skip:
throw "internal error";
@@ -244,7 +256,8 @@ class OptionParser {
generateLibrary: generateLibrary, isVerbose: isVerbose ?? false,
isBatch: isBatch ?? false, pattern: pattern,
throwOnError: throwOnError ?? false,
- throwOnErrorCount: throwOnErrorCount, analyze: analyze ?? false);
+ throwOnErrorCount: throwOnErrorCount, analyze: analyze ?? false,
+ noOutput: noOutput ?? false);
}
List<OptionValue> parseValues() {
« no previous file with comments | « no previous file | lib/src/rastask.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698