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

Unified Diff: pkg/args/lib/src/parser.dart

Issue 796593004: Add an ArgResults.original getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 years 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 | « pkg/args/lib/src/arg_results.dart ('k') | pkg/args/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/args/lib/src/parser.dart
diff --git a/pkg/args/lib/src/parser.dart b/pkg/args/lib/src/parser.dart
index 4d3417a12599df4b323b9e120f5501db597c65b1..9cd141c00a334b63b6ac491d5c38deb05aea510b 100644
--- a/pkg/args/lib/src/parser.dart
+++ b/pkg/args/lib/src/parser.dart
@@ -46,6 +46,7 @@ class Parser {
/// Parses the arguments. This can only be called once.
ArgResults parse() {
+ var arguments = args.toList();
var commandResults = null;
// Parse the args.
@@ -91,7 +92,8 @@ class Parser {
// Add in the leftover arguments we didn't parse to the innermost command.
rest.addAll(args);
args.clear();
- return newArgResults(grammar, results, commandName, commandResults, rest);
+ return newArgResults(grammar, results, commandName, commandResults, rest,
+ arguments);
}
/// Pulls the value for [option] from the second argument in [args].
« no previous file with comments | « pkg/args/lib/src/arg_results.dart ('k') | pkg/args/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698