aboutsummaryrefslogtreecommitdiff
path: root/mingling_picker/src/picker/patterns.rs
Commit message (Collapse)AuthorAgeFilesLines
* feat(picker): remove route phantom from IntoPicker trait魏曹先生19 hours1-0/+26
| | | | | | Add `with_route` methods to `IntoPicker` and `PickerPattern` for setting the route type explicitly when needed, instead of carrying it as a generic parameter on the trait itself.
* feat(picker): add early route on missing flag魏曹先生23 hours1-0/+25
| | | | | | | Introduce `or_route` and a `PickerResult` type that carries an optional route value. When a flag is absent, the closure given to `or_route` is evaluated and stored in `error_route`, allowing the caller to exit early without a default value.
* feat(picker): add Route generic parameter for error routing魏曹先生23 hours1-6/+9
|
* refactor: rename `PickerResult` to `PickerArgResult` and add new魏曹先生23 hours1-4/+25
| | | | `PickerResult` struct
* refactor: remove unnecessary `Default` bound from `Pickable` trait魏曹先生23 hours1-5/+5
|
* feat: add lifetime-bound pickable support and refine type constraints魏曹先生43 hours1-5/+5
|
* feat(mingling): make core and macros features optional魏曹先生44 hours1-0/+1
|
* feat(patterns): add `or` and `post` builder methods to pattern types魏曹先生46 hours1-2/+53
|
* feat(picker): add default and post-processing hooks for flags魏曹先生46 hours1-0/+8
|
* feat(picker): add `pick` method to start and extend flag chains魏曹先生2 days1-0/+9
|
* feat(mingling_picker_macros): add $+ $- $^ special tokens to魏曹先生2 days1-4/+33
| | | | | | | | | | | | | | | | internal_repeat Extend the `internal_repeat` macro with new special tokens: - `$+`/`ident$+` for current + 1 - `$-`/`ident$-` for current - 1 (clamped at 0) - `$^`/`ident$^` for min (aka start) value Move the repetition marker from outside the paren to the last token inside, supporting `(group,+)` syntax where `+` is the final token. A trailing `+` or `-` after `)` shifts the repetition count. Add `PickerPattern::pick` method using new syntax to allow incremental composition of typed picks.
* refactor: rename PickerArguments to PickerArgs and PickerRequirement to魏曹先生3 days1-6/+6
| | | | PickerFlag
* refactor(mingling_picker): move parse result out of requirement and into魏曹先生3 days1-4/+18
| | | | | | | | | | pattern BREAKING CHANGE: `PickerRequirement` no longer stores a `PickerResult`. Parsed results are now held in the `PickerPattern` structs. The `result`, `result_mut`, `set_result`, `reset_result`, and `with_result` methods on `PickerRequirement` have been removed. The `Picker::pick` method is introduced to begin a pattern definition.
* feat(picker): add core trait, types, and builder macro for argument魏曹先生3 days1-0/+12
parsing Implement the foundational `mingling_picker` library along with its companion `mingling_picker_macros` crate. The picker provides: - `Pickable` trait for parsing types from raw strings - `PickerResult` enum modeling parse outcomes - `Picker` struct for storing and indexing command-line arguments - `PickerRequirement` struct for declarative parameter definitions - `PickerPattern` family (1..32) of typed pattern structs via the `internal_repeat` proc macro - `req!` proc macro as a succinct builder for `PickerRequirement` Re-export `mingling_picker::macros::*` from the `mingling` crate when the `picker` feature is enabled, replacing the previous wildcard re-export of `mingling_macros`.