aboutsummaryrefslogtreecommitdiff
path: root/mingling_macros/src/attr/command.rs
Commit message (Collapse)AuthorAgeFilesLines
* fix(dispatch_tree): emit re-export token stream directly魏曹先生27 hours1-5/+8
|
* feat(attr): allow #[command] on functions with no args param魏曹先生27 hours1-20/+42
| | | | | | | Previously, #[command] required at least one owned parameter for args injection. Now, if the first parameter is a reference or there are no parameters, a synthetic entry parameter is inserted so the function can still be used with #[chain].
* feat(mingling_macros, mingling_pathf): add `#[command]` attribute macro魏曹先生29 hours1-0/+340
Add a new `#[command]` attribute macro (feature-gated behind `extra_macros`) that converts a plain function with a `Vec<String>` parameter into a fully wired Mingling command. The macro generates a `dispatcher!` call, a `#[chain]` wrapper, and a hidden module re-exporting all generated types. Also add `CommandPattern` to the pathf pattern analyzer to recognize `#[command]`-annotated functions and track their generated hidden modules.