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

Unified Diff: pkg/analyzer_experimental/lib/options.dart

Issue 15675016: More fixes for java2dart and status files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
Index: pkg/analyzer_experimental/lib/options.dart
diff --git a/pkg/analyzer_experimental/lib/options.dart b/pkg/analyzer_experimental/lib/options.dart
index 8c26f43ac9174a29fc35540b100d8f9c6155fbda..83d55851c373e8725b148b6fd24c48a0ea3431de 100644
--- a/pkg/analyzer_experimental/lib/options.dart
+++ b/pkg/analyzer_experimental/lib/options.dart
@@ -86,6 +86,7 @@ class CommandLineOptions {
}
static CommandLineOptions _parse(List<String> args) {
+ args = args.expand((String arg) => arg.split('=')).toList();
var parser = new _CommandLineParser()
..addFlag('batch', abbr: 'b', help: 'Run in batch mode',
defaultsTo: false, negatable: false)
@@ -200,6 +201,7 @@ class _CommandLineParser {
void addOption(String name, {String abbr, String help, List<String> allowed,
Map<String, String> allowedHelp, String defaultsTo,
void callback(value), bool allowMultiple: false}) {
+ _knownFlags.add(name);
_parser.addOption(name, abbr: abbr, help: help, allowed: allowed,
allowedHelp: allowedHelp, defaultsTo: defaultsTo, callback: callback,
allowMultiple: allowMultiple);
@@ -224,7 +226,7 @@ class _CommandLineParser {
List<String> _filterUnknowns(args) {
// Only filter args if the ignore flag is specified.
- if (!args.contains('--ignore_unrecognized_flags')) {
+ if (!args.contains('--ignore-unrecognized-flags')) {
return args;
}
@@ -238,6 +240,7 @@ class _CommandLineParser {
var arg = args[i];
if (arg.startsWith('--') && arg.length > 2) {
if (!_knownFlags.contains(arg.substring(2))) {
+ print('remove: $arg');
//"eat" params by advancing to the next flag/option
i = _getNextFlagIndex(args, i);
} else {
@@ -248,6 +251,7 @@ class _CommandLineParser {
}
}
+ print(filtered);
return filtered;
}

Powered by Google App Engine
This is Rietveld 408576698