| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 /** | |
| 6 * Support for client code that extends command-line tools that use the analysis | |
| 7 * engine by adding new command-line arguments. | |
| 8 */ | |
| 9 library analyzer.plugin.command_line; | |
| 10 | |
| 11 import 'package:analyzer/src/plugin/command_line_plugin.dart'; | |
| 12 import 'package:args/args.dart'; | |
| 13 import 'package:plugin/plugin.dart'; | |
| 14 | |
| 15 /** | |
| 16 * The identifier of the extension point that allows plugins to add new flags | |
| 17 * and options to the command-line parser before the parser is used to parse | |
| 18 * the command-line. The object used as an extension must be an | |
| 19 * [ArgParserContributor]. | |
| 20 */ | |
| 21 final String PARSER_CONTRIBUTOR_EXTENSION_POINT_ID = Plugin.join( | |
| 22 CommandLinePlugin.UNIQUE_IDENTIFIER, | |
| 23 CommandLinePlugin.PARSER_CONTRIBUTOR_EXTENSION_POINT); | |
| 24 | |
| 25 /** | |
| 26 * The identifier of the extension point that allows plugins to access the | |
| 27 * result of parsing the command-line. The object used as an extension must be | |
| 28 * an [ArgResultsProcessor]. | |
| 29 */ | |
| 30 final String RESULT_PROCESSOR_EXTENSION_POINT_ID = Plugin.join( | |
| 31 CommandLinePlugin.UNIQUE_IDENTIFIER, | |
| 32 CommandLinePlugin.RESULT_PROCESSOR_EXTENSION_POINT); | |
| 33 | |
| 34 /** | |
| 35 * A function that will contribute flags and options to the command-line parser. | |
| 36 */ | |
| 37 typedef void ArgParserContributor(ArgParser parser); | |
| 38 | |
| 39 /** | |
| 40 * A function that will process the results of parsing the command-line. | |
| 41 */ | |
| 42 typedef void ArgResultsProcessor(ArgResults results); | |
| OLD | NEW |