Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow parsers that don’t handle commands yet
Parsers serve two purposes: 1. They determine whether or not a command executes its arguments. 2. They determine which parts of a command’s arguments are other commands that get executed. Before this change, parsers would have to do both, or else you would get an AttributeError. Now, you can create a partial parser that can confirm that a specific invocation doesn’t run any of its arguments but can’t handle invocations that do run their arguments. Specifically, this change is in preparation for adding a parser for flatpak. flatpak has 43 built-in subcommands, some of which are able to execute their arguments. I don’t want to bother adding a parser that supports all 43 of those. I want to add a parser that supports a single subcommand, and that subcommand can’t run its arguments.
- Loading branch information