aboutsummaryrefslogtreecommitdiff
path: root/mingling_picker
Commit message (Collapse)AuthorAgeFilesLines
* feat(mingling_picker): replace bool Matcher with FlagMatcherfeat/picker2魏曹先生7 hours4-18/+28
| | | | | | Rename `bool_matcher` module to `flag_matcher` and introduce a dedicated `FlagMatcher` struct, moving matching logic away from the `bool` type itself
* feat(picker): add from_args and from_args_skip constructors魏曹先生9 hours1-0/+25
|
* chore(deps): bump just_fmt from 0.1.2 to 0.2.0魏曹先生10 hours1-2/+2
|
* feat(parselib): apply naming case conversion to long flags and aliases魏曹先生11 hours2-4/+75
|
* refactor(test): split monolithic test file into module files魏曹先生11 hours4-567/+572
|
* test: add multi-style flag parsing tests魏曹先生11 hours1-1/+146
| | | | | Add comprehensive test coverage for Windows, PowerShell, and UNIX style flag matching, including case sensitivity and end-of-options behavior
* feat(picker): return NotFound for unmatched boolean flags魏曹先生11 hours2-2/+10
|
* feat(test): add comprehensive bool flag and route tests魏曹先生11 hours1-1/+412
|
* fix(mingling_picker): correct mask size and arg index in tag phase魏曹先生16 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.
* test: add integration test crate for mingling_picker魏曹先生16 hours4-0/+96
|
* feat(picker): remove route phantom from IntoPicker trait魏曹先生16 hours2-11/+52
| | | | | | 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.
* fix: set default type parameter for `Picker` struct魏曹先生17 hours2-3/+3
| | | | Update doc examples to pass `String` instead of `&str` to `convert`
* feat(picker): add builtin bool pickable and parselib matcher framework魏曹先生17 hours10-9/+594
| | | | | | | | Add `Pickable` implementation for `bool` and the supporting `Matcher` trait with utility functions for argument matching. Expose `pickable_needed` and `matcher_needed` modules for downstream trait implementors.
* chore(version): add standalone crate version tracking in README魏曹先生19 hours1-0/+7
|
* feat(picker): add unwrap, unpack, to_result, to_option on PickerPattern魏曹先生20 hours3-32/+44
|
* fix: move mask initialization outside bundle loop in parse.rs魏曹先生20 hours1-3/+3
|
* feat(picker): add argument-position mask to tag phase魏曹先生20 hours2-3/+15
| | | | | | 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魏曹先生20 hours5-11/+77
| | | | | | | 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.
* refactor: remove ParseError variant from PickerArgResult魏曹先生20 hours1-17/+7
| | | | | | The ParseError variant has been removed and its usages in From, is_found, is_err, and unwrap have been updated to use NotFound instead, simplifying the error handling model.
* feat(picker): add Route generic parameter for error routing魏曹先生20 hours3-47/+59
|
* refactor: rename `PickerResult` to `PickerArgResult` and add new魏曹先生21 hours6-83/+161
| | | | `PickerResult` struct
* refactor: remove unnecessary `Default` bound from `Pickable` trait魏曹先生21 hours5-25/+120
|
* refactor(picker): delegate Picker methods to PickerArgs魏曹先生22 hours1-94/+84
|
* feat(flag): add PositionalMulti variant and convenience methods魏曹先生24 hours2-6/+77
|
* refactor(pickable): redesign Pickable trait with two-phase parse API魏曹先生33 hours5-102/+134
| | | | | | | | | | | | | | Introduce `get_attr`, `tag`, and `pick` as the new trait methods, replacing the single `tag` method that returned a `PickerTag`. This enables the parser to first collect all argument position requirements and then resolve them in a second pass. Rename `PickerTag` to `PickerArgInfo` and reorder `PickerFlagAttr` variants to reflect parse priority (`Positional < Flag < Single < Multi`). Add `positional_or_else` helper to `PickerFlagAttr`.
* feat(flag): add PickerFlagAttr enum for parameter attributes魏曹先生33 hours1-0/+74
|
* refactor: consolidate result and tag modules into infos魏曹先生34 hours3-199/+197
|
* feat(picker): add `mingling_support` feature and `is_flag` field魏曹先生34 hours4-4/+21
| | | | | | | Rename the `core` feature to `mingling_support` in `mingling_picker` and propagate it through `mingling_picker_macros`. Add the `is_flag` field to `PickerTag` to indicate participation in parsing after a `--` separator. Remove empty `seek.rs` file.
* feat: add lifetime-bound pickable support and refine type constraints魏曹先生41 hours10-44/+231
|
* feat(picker): add optional `core` feature with re-exports魏曹先生42 hours3-1/+11
| | | | | | Define a `core` feature in mingling_picker that gates a new `corebind` module and re-exports its contents. The module is propagated to the upstream `mingling` crate under the same feature flag.
* feat(mingling): make core and macros features optional魏曹先生42 hours1-0/+1
|
* feat(style): make ParserStyle fields public魏曹先生42 hours1-7/+7
|
* feat(style): fall back to UNIX_STYLE when global style unset魏曹先生42 hours1-7/+3
|
* feat(mingling): add ParserStyle and re-export parselib module魏曹先生42 hours2-0/+88
| | | | | | | | | | | Add a configurable `ParserStyle` struct defining option prefix, separator and case-sensitivity conventions, with built-in constants for Unix, PowerShell and Windows styles. Provide a one-time global style setter. Re-export the new `parselib` module from `mingling_picker` and wire it through `mingling`'s `picker` facade. Also relocate `Groupped` and `RenderResult` re-exports in `prelude` for better ordering.
* feat(picker): add parselib module and README魏曹先生43 hours3-0/+37
|
* feat(patterns): add `or` and `post` builder methods to pattern types魏曹先生43 hours1-2/+53
|
* feat(picker): add default and post-processing hooks for flags魏曹先生44 hours2-0/+16
|
* refactor: rename requirement.rs to flag.rs魏曹先生44 hours2-2/+2
|
* feat(mingling_picker): rename FormatError to ParseError and add parse魏曹先生2 days3-18/+224
| | | | | | | | | 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 IntoPicker impl for &[String] and &T deref to魏曹先生2 days1-1/+22
| | | | Vec<String>
* feat(picker): add `pick` method to start and extend flag chains魏曹先生2 days2-0/+27
|
* 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 days3-33/+33
| | | | PickerFlag
* refactor(mingling_picker): move parse result out of requirement and into魏曹先生2 days2-42/+28
| | | | | | | | | | 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 `is_empty` method and refactor `if let` chains魏曹先生2 days1-0/+17
| | | | | Refactor multiple `if let` patterns in macros to use the let-chain syntax for improved readability
* feat(picker): add core trait, types, and builder macro for argument魏曹先生2 days7-1/+554
| | | | | | | | | | | | | | | | | | | | | | 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`.
* chore(deps): move mingling_picker_macros dependency to picker crate魏曹先生2 days1-0/+1
|
* fix: correct typo in module nameHEADmain魏曹先生5 days1-1/+1
|
* chore(picker): add mingling_core as a dependency魏曹先生5 days1-0/+1
|
* feat: add mingling-picker and mingling-picker-macros crates魏曹先生5 days3-0/+12