aboutsummaryrefslogtreecommitdiff
path: root/mingling_macros/src
Commit message (Collapse)AuthorAgeFilesLines
* feat(routeify): reorder import paths for consistency魏曹先生3 days1-1/+1
|
* feat(routeify): map `?` span to `route!` for tooling support魏曹先生3 days2-2/+31
| | | | | | Use the span of the `?` token when generating the macro invocation in the `#[routeify]` transformation, so that rust-analyzer resolves hover and go-to-definition on `?` to the `route!` macro's documentation
* fix(dispatcher): qualify to_chain call with Routable trait魏曹先生3 days1-1/+1
|
* feat(extensions): add routeify extension macro for error routing魏曹先生3 days3-40/+66
|
* chore(macros): reorganize module hierarchy in mingling_macros魏曹先生3 days25-740/+710
| | | | | | 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.
* feat(macros): add extension point mechanism for attribute macros魏曹先生3 days2-1/+169
| | | | | | | Implement an `extensions` module in `mingling_macros` that allows attribute macros to accept extension identifiers (e.g., `routeify`) which are re-dispatched as outer attributes before the core macro logic runs, enabling extensibility without modifying existing macros
* feat(macros): add Routable trait and update route! macro魏曹先生4 days1-8/+35
| | | | | | Introduce a `Routable` trait with `to_chain` and `to_render` methods, replacing direct `Grouped` usage in the `route!` macro so error branches correctly route through the rendering pipeline
* fix!: rename `Groupped` to `Grouped` across the codebase魏曹先生4 days8-58/+58
|
* feat(macros:chain): accept any return type in chain functions魏曹先生4 days1-33/+21
|
* feat(macros): relax `#[help]` return type to accept `Into<RenderResult>`魏曹先生5 days2-33/+14
|
* ix(macros)!: require explicit `.into()` on chain function return values魏曹先生5 days4-152/+77
|
* feat(macros): allow `#[renderer]` to accept any return type魏曹先生5 days1-36/+10
|
* docs: add module-level documentation and improve doc comments魏曹先生6 days1-40/+40
|
* style: Reorder imports and reformat code with cargo fmt魏曹先生12 days3-5/+6
|
* refactor(examples): migrate renderers to return RenderResult and add魏曹先生12 days1-4/+6
| | | | | | | | | std::io::Write import Replace r_println!/r_print! macro usage across all example renderers with explicit RenderResult construction using std::io::Write, enabling more flexible output handling and reducing reliance on macro-side effects.
* fix(docs): correct RenderResult usage examples to use mut binding and魏曹先生12 days1-7/+10
| | | | add Write import
* feat: require renderers to return RenderResult instead of mutating one魏曹先生12 days4-262/+129
| | | | | | | BREAKING CHANGE: The `render` method on `Renderer`, `HelpRequest`, and `ProgramCollect` now returns `RenderResult` instead of taking `&mut RenderResult`. The `r_print!` and `r_println!` macros have been removed in favor of using `std::io::Write` directly on `RenderResult`.
* feat(structural_data): align type use generation with group_impl魏曹先生13 days1-2/+9
|
* chore: run cargo fmt and rearrange re-exports in mingling魏曹先生2026-07-023-6/+5
|
* fix(macros): fix false positives in entry_has_variant substring matching魏曹先生2026-07-021-4/+21
|
* fix(macros): pass pathf_map into dispatch tree generators魏曹先生2026-06-292-31/+31
|
* feat(macros): add pathf type resolution for downcasts魏曹先生2026-06-291-29/+81
|
* refactor(pack_err): replace inline to_snake_case with just_fmt魏曹先生2026-06-291-33/+5
|
* refactor(macros): reorganize module structure and parse pathf include魏曹先生2026-06-291-6/+25
| | | | | | | inline Instead of using `include!` with generated paths, read the file at compile time and parse it into a token stream during macro expansion.
* feat(pathf): add build-time type path resolution system魏曹先生2026-06-281-0/+10
| | | | | | | Add `mingling_pathf` sub-crate and `pathf` feature for automatic resolution of Mingling type module paths at build time. Scans source files, identifies macro invocations via pattern matchers, and generates mapping files consumed by `gen_program!()`.
* feat(macros): add async mutable resource injection for `#[chain]`魏曹先生2026-06-273-27/+93
| | | | | | | Support `&mut T` resource parameters in async chain functions by using an extract-store pattern that avoids holding mutable borrows across await points. Remove the previous compile-time rejection of this combination.
* fix: use fully qualified path to get_global_set in pack_err魏曹先生2026-06-271-3/+1
|
* feat(macros, docs): register structural macros and update feature table魏曹先生2026-06-261-2/+10
|
* feat(macros): Render ResultEmpty for non-structural types魏曹先生2026-06-261-1/+7
|
* feat(macros): simplify ResultEmpty to a unit struct魏曹先生2026-06-262-6/+18
|
* refactor(general_renderer): rename to structural_renderer魏曹先生2026-06-266-60/+60
|
* feat(core): decouple structured output from Groupped trait魏曹先生2026-06-265-21/+536
| | | | | | | Introduce `StructuralData` sealed trait and `pack_structural!` / `group_structural!` / `derive(StructuralData)` macros to control structured rendering separately from grouping. `Groupped` no longer requires `Serialize`.
* fix(dispatch_tree): use proper snake_case for dispatcher static names魏曹先生2026-06-253-3/+6
| | | | | | | | | Fix the static name generation for dispatch tree nodes to use a correct snake_case conversion instead of a simple `.` to `_` replacement. Also correct the `__comp` completion dispatcher name from triple underscore to double underscore, resolving a mismatch between `register_dispatcher!` and `program_comp_gen`
* Make `dispatcher_clap` help function public魏曹先生2026-06-251-1/+1
|
* Trim whitespace from variant string after removing trailing comma魏曹先生2026-06-231-1/+1
|
* Disambiguate to_chain call via full qualification魏曹先生2026-06-231-3/+7
|
* Add entry-str dedup and registry cleanup in final gen魏曹先生2026-06-235-7/+39
|
* Add aliased syntax to `group!` macro魏曹先生2026-06-231-10/+56
| | | | | Allow `group!(Alias = TypePath)` to create a type alias and use the alias name as the enum variant, enabling more descriptive naming
* Add compile-time duplicate variant detection魏曹先生2026-06-235-10/+112
| | | | | | Add duplicate variant checks for chain, renderer, help, and completion registrations to produce a clear compile error instead of silently generating unreachable code
* Replace macro_rules dispatch with proc-macro generation魏曹先生2026-06-231-6/+107
| | | | | | | | Generate `render()` and `do_chain()` match dispatch directly in `program_final_gen`, using a compile-time `ASYNC_ENABLED` constant to select the correct sync/async signature. Removes the `__dispatch_program_renderers!` and `__dispatch_program_chains!` macros from `mingling_core`.
* Make route! macro auto-convert error types魏曹先生2026-06-221-7/+8
| | | | | | `route!()` now calls `Groupped::to_chain()` on the error branch, removing the need for callers to pre-convert with `.to_chain()` or `.to_render()`.
* Support resource injection in #[help] and #[completion魏曹先生2026-06-222-64/+187
|
* Support qualified type paths in four macros魏曹先生2026-06-226-82/+17
|
* Remove all explicit program name modes from macrosremoved-shit魏曹先生2026-06-209-591/+176
|
* Support single-segment type paths in group macro魏曹先生2026-06-201-1/+19
|
* Add `group!` macro for registering external types魏曹先生2026-06-202-0/+168
|
* Add shared `MockProgramCollect` and conditional `Groupped` bounds魏曹先生2026-06-202-1/+7
| | | | | | Extract duplicate `MockCollect` implementations into a reusable `MockProgramCollect` type. Conditionally require `Serialize` on the `Groupped` trait when the `general_renderer` feature is enabled.
* Move to_chain and to_render to Groupped trait魏曹先生2026-06-202-36/+0
|
* Add dispatch_tree integration to dispatcher_clap魏曹先生2026-06-191-1/+29
|
* Refactor macros `pack_err!` struct fields public魏曹先生2026-06-191-3/+3
|