aboutsummaryrefslogtreecommitdiff
path: root/mingling_macros/src/attr/command.rs
Commit message (Collapse)AuthorAgeFilesLines
* refactor!: remove Node type and simplify dispatcher macro syntax魏曹先生3 hours1-33/+20
| | | | | | | The `dispatcher!` macro no longer requires a `CMD*` dispatcher type argument; the dispatcher struct is now generated internally as `__Dispatcher{Pascal}`. The `Node` type, `node!` macro, and `Dispatcher::node()` / `clone_dispatcher()` methods are removed.
* refactor!: remove dynamic dispatcher registration API魏曹先生4 hours1-6/+3
| | | | | | | Dispatchers are now always registered at compile time, removing the `with_dispatcher` / `with_dispatchers` methods and the `PathfinderConfig` API. The `dispatch_tree` feature now only controls the matching strategy (trie vs linear list).
* chore: add "Doc Not Optimize" comments to source files魏曹先生3 days1-0/+1
| | | | | Mark all source files with a comment indicating they are not optimized for documentation purposes.
* refactor: simplify macro parsing code and fix clippy warnings魏曹先生7 days1-10/+9
|
* refactor: simplify boolean and type assignment logic魏曹先生2026-08-031-3/+3
|
* fix(dispatch_tree): emit re-export token stream directly魏曹先生2026-07-281-5/+8
|
* feat(attr): allow #[command] on functions with no args param魏曹先生2026-07-281-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魏曹先生2026-07-281-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.