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

Unified Diff: mojo/public/dart/third_party/analyzer/lib/plugin/command_line.dart

Issue 1346773002: Stop running pub get at gclient sync time and fix build bugs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 3 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: mojo/public/dart/third_party/analyzer/lib/plugin/command_line.dart
diff --git a/mojo/public/dart/third_party/analyzer/lib/plugin/command_line.dart b/mojo/public/dart/third_party/analyzer/lib/plugin/command_line.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7a6fbd80cf57054937917d2a72752bbfe6a8eb49
--- /dev/null
+++ b/mojo/public/dart/third_party/analyzer/lib/plugin/command_line.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/**
+ * Support for client code that extends command-line tools that use the analysis
+ * engine by adding new command-line arguments.
+ */
+library analyzer.plugin.command_line;
+
+import 'package:analyzer/src/plugin/command_line_plugin.dart';
+import 'package:args/args.dart';
+import 'package:plugin/plugin.dart';
+
+/**
+ * The identifier of the extension point that allows plugins to add new flags
+ * and options to the command-line parser before the parser is used to parse
+ * the command-line. The object used as an extension must be an
+ * [ArgParserContributor].
+ */
+final String PARSER_CONTRIBUTOR_EXTENSION_POINT_ID = Plugin.join(
+ CommandLinePlugin.UNIQUE_IDENTIFIER,
+ CommandLinePlugin.PARSER_CONTRIBUTOR_EXTENSION_POINT);
+
+/**
+ * The identifier of the extension point that allows plugins to access the
+ * result of parsing the command-line. The object used as an extension must be
+ * an [ArgResultsProcessor].
+ */
+final String RESULT_PROCESSOR_EXTENSION_POINT_ID = Plugin.join(
+ CommandLinePlugin.UNIQUE_IDENTIFIER,
+ CommandLinePlugin.RESULT_PROCESSOR_EXTENSION_POINT);
+
+/**
+ * A function that will contribute flags and options to the command-line parser.
+ */
+typedef void ArgParserContributor(ArgParser parser);
+
+/**
+ * A function that will process the results of parsing the command-line.
+ */
+typedef void ArgResultsProcessor(ArgResults results);

Powered by Google App Engine
This is Rietveld 408576698