Expand description
Shared step-pattern parsing utilities for rstest-bdd.
The crate exposes placeholder parsing helpers reused by both the runtime and proc-macro crates so they can share validation logic without duplicating the regex construction code paths.
Re-exports§
pub use pattern::build_regex_from_pattern;
Modules§
- pattern
- Step-pattern lexing and compilation helpers.
Structs§
- Placeholder
Error Info - Additional context for placeholder-related parsing errors.
- Specificity
Score - Specificity score for a step pattern.
- Step
Keyword Parse Error - Error returned when parsing a
StepKeywordfrom a string fails. - Unsupported
Step Type - Error raised when converting a parsed Gherkin
StepTypeinto aStepKeywordfails.
Enums§
- Pattern
Error - Errors surfaced while converting step patterns into regular expressions.
- Step
Keyword - Keyword used to categorise a step definition.
Functions§
- compile_
regex_ from_ pattern - Build and compile a
Regexfrom a step pattern. - extract_
captured_ values - Extract the placeholder capture groups when
textmatchesre, returningNoneotherwise. - get_
type_ pattern - Translate a placeholder type hint into a regular-expression fragment.
- requires_
quote_ stripping - Check whether a type hint requires quote stripping.