Chromium Code Reviews| Index: pkg/args/lib/src/arg_results.dart |
| diff --git a/pkg/args/lib/src/arg_results.dart b/pkg/args/lib/src/arg_results.dart |
| index 2e47a8e907b724f41982b7177976d8d7dd6fda54..55504915872052ac9c00bbea8ceeea4ff2aadb87 100644 |
| --- a/pkg/args/lib/src/arg_results.dart |
| +++ b/pkg/args/lib/src/arg_results.dart |
| @@ -13,8 +13,9 @@ import 'arg_parser.dart'; |
| /// Since [ArgResults] doesn't have a public constructor, this lets [Parser] |
| /// get to it. This function isn't exported to the public API of the package. |
| ArgResults newArgResults(ArgParser parser, Map<String, dynamic> parsed, |
| - String name, ArgResults command, List<String> rest) { |
| - return new ArgResults._(parser, parsed, name, command, rest); |
| + String name, ArgResults command, List<String> rest, |
| + List<String> original) { |
| + return new ArgResults._(parser, parsed, name, command, rest, original); |
| } |
| /// The results of parsing a series of command line arguments using |
| @@ -46,10 +47,14 @@ class ArgResults { |
| /// `--` was reached. |
| final List<String> rest; |
| + /// The original list of arguments that were parsed. |
| + final List<String> original; |
|
Bob Nystrom
2014/12/11 01:13:23
What do you think of "arguments" or "allArguments"
nweiz
2014/12/11 01:17:18
Done.
|
| + |
| /// Creates a new [ArgResults]. |
| ArgResults._(this._parser, this._parsed, this.name, this.command, |
| - List<String> rest) |
| - : this.rest = new UnmodifiableListView(rest); |
| + List<String> rest, List<String> original) |
| + : this.rest = new UnmodifiableListView(rest), |
| + this.original = new UnmodifiableListView(original); |
| /// Gets the parsed command-line option named [name]. |
| operator [](String name) { |