Repository navigation
Add rfl::cli aliases, counters, constraints, negatable flags, SingleDashLong, PreserveNames, and BoolValueTokens - #64
Closed
clockblocker wants to merge 1 commit into
Conversation
clockblocker
force-pushed
the
cli-parsing-modes-and-occurrences
branch
from
November 27, 2026 07:29
4eaa3ae to
a89b5c2
Compare
…ashLong, PreserveNames, and BoolValueTokens
clockblocker
force-pushed
the
cli-attributes-and-syntax-processors
branch
from
November 27, 2026 07:30
175eca5 to
8569e03
Compare
Owner
Author
|
Closing mega-PR: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds declarative option attributes and CLI syntax processors for real-world C++ CLIs:
rfl::cli::attr::Alias<"name">(repeatable long aliases resolving to canonical field name, supporting abbreviations)rfl::cli::attr::Counter(additive repeatable count flags such as-v,-vvv,--verbose)rfl::cli::attr::Excludes<"opt">andrfl::cli::attr::Needs<"opt">(declarative mutual-exclusion and co-dependency checks)rfl::cli::attr::Negatable<Prefix>andrfl::cli::attr::NegatedName<"name">(e.g.--pyc/--no-pyc,-finline/-fno-inline)rfl::cli::SingleDashLong: accept single-dash long options (-datadir=...)rfl::cli::PreserveNames: opt out of automaticSnakeCaseToKebabCaseconversionrfl::cli::BoolValueTokens: accept separate boolean literal tokens after long flags (--use-gpu 0/--use-gpu 1)rfl::cli::OptionOccurrencemetadata (name,value,has_value,negated,raw)Stacked on
cli-parsing-modes-and-occurrences(#63). Verified with ASan + UBSan across all CLI tests.