mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-15 04:49:52 +00:00
Merge pull request #7245 from dotCooCoo/fix/not-files-real-params
Plug-ins: file-key exemptions name only params a command takes
This commit is contained in:
@@ -172,6 +172,13 @@ fn accepted(doc: &'static str, depth: usize) -> Option<Vec<&'static str>> {
|
||||
Some(keys)
|
||||
}
|
||||
|
||||
/// Every key the description `doc` takes, those of the commands its `…` entries name included, or
|
||||
/// `None` when that isn't known: it doesn't parse, a `…` entry names no command, or one names a
|
||||
/// command in [`UNCHECKED`].
|
||||
pub(crate) fn accepted_keys(doc: &'static str) -> Option<Vec<&'static str>> {
|
||||
accepted(doc, 0)
|
||||
}
|
||||
|
||||
/// Does the description `doc` name `key` as a parameter (its own keys, and those of the commands
|
||||
/// its `…` entries name)?
|
||||
pub(crate) fn takes_key(doc: &'static str, key: &str) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user