aboutsummaryrefslogtreecommitdiff
path: root/mingling_picker/src/picker
Commit message (Collapse)AuthorAgeFilesLines
* fix(mingling_picker): correct mask size and arg index in tag phase魏曹先生15 hours1-3/+3
| | | | | | | Previously, the mask was sized by the template param `$` and arg indexing used `$-`, causing incorrect results when the actual number of arguments differed from the macro expansion count.
* feat(picker): remove route phantom from IntoPicker trait魏曹先生15 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 unwrap, unpack, to_result, to_option on PickerPattern魏曹先生18 hours1-1/+44
|
* fix: move mask initialization outside bundle loop in parse.rs魏曹先生18 hours1-3/+3
|
* feat(picker): add argument-position mask to tag phase魏曹先生19 hours1-3/+9
| | | | | | Pass a mutable mask to tag functions so Pickable implementations can detect which argument positions have already been claimed by other Pickables during the same parsing pass
* feat(picker): add early route on missing flag魏曹先生19 hours3-11/+51
| | | | | | | 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魏曹先生19 hours2-27/+28
|
* refactor: rename `PickerResult` to `PickerArgResult` and add new魏曹先生19 hours2-4/+79
| | | | `PickerResult` struct
* refactor: remove unnecessary `Default` bound from `Pickable` trait魏曹先生20 hours2-9/+111
|
* feat: add lifetime-bound pickable support and refine type constraints魏曹先生40 hours2-6/+6
|
* feat(mingling): make core and macros features optional魏曹先生41 hours1-0/+1
|
* feat(patterns): add `or` and `post` builder methods to pattern types魏曹先生42 hours1-2/+53
|
* feat(picker): add default and post-processing hooks for flags魏曹先生42 hours1-0/+8
|
* feat(mingling_picker): rename FormatError to ParseError and add parse魏曹先生2 days1-0/+17
| | | | | | | | | module Remove unnecessary Pickable trait bounds on PickerResult and its From implementations. Introduce a new `parse` module with macro-generated parse stubs for up to 32 tuple types.
* 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魏曹先生2 days1-6/+6
| | | | PickerFlag
* refactor(mingling_picker): move parse result out of requirement and into魏曹先生2 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魏曹先生2 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`.