aboutsummaryrefslogtreecommitdiff
path: root/mingling_macros/src/attr
Commit message (Collapse)AuthorAgeFilesLines
* fix(dispatch_tree): emit re-export token stream directly魏曹先生29 hours1-5/+8
|
* feat(attr): allow #[command] on functions with no args param魏曹先生30 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魏曹先生31 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.
* feat(macros): split monolith into one-macro-per-file modules魏曹先生3 days2-55/+9
|
* refactor(chain): replace Into turbofish with Routable::to_chain魏曹先生9 days1-13/+9
| | | | | | | | Remove the `origin_return_type` parameter and replace the generic `Into` conversion with a direct call to `Routable::<#program_type>::to_chain`. For non-unit returns, also wrap the function call expression in `to_chain()` upfront to satisfy the `ChainProcess<C>` requirement of `__modify_res_and_return_route`.
* feat(macros): preserve user function as standalone item in codegen魏曹先生10 days4-60/+140
| | | | | | | | | | | Refactor #[chain], #[renderer], #[help], and #[completion] macros to keep the original user function as a named item instead of inlining its body. Trait method implementations now call the original function by name, injecting resources from the application context. This improves debugging (stack traces reference user function names), error messages, and macro expansion clarity.
* feat(core)!: remove `to_chain` and `to_render` from `Grouped` trait魏曹先生10 days2-7/+7
| | | | | Move routing methods exclusively to the `Routable` trait and update all macro-generated code to reference `Routable` instead of `Grouped`
* chore(macros): reorganize module hierarchy in mingling_macros魏曹先生10 days6-0/+1410
Restructure flat module layout into logical directories (attr/, derive/, func/, systems/, extensions/, utils.rs). Tighten internal function visibility to pub(crate). All public API signatures remain unchanged.