Expand description
Cucumber-expression matching — the owned layer over the cucumber-expressions
crate’s grammar parser. Replaces io.cucumber.cucumberexpressions. We take the
crate’s AST parser (the escape-rule-dense part) and own the small, corpus-pinned
rest: regex generation with one named group per parameter, built-in + custom
parameter types, argument extraction, and parameter_type_names.
Deviation from the cucumber-expressions 20.0.0 line every other port pins
(recorded in ADR 0006, doc/adr/0006-rust-port.md): there is no official
Rust port, so this crate hand-writes the regex generation, and only the
{int}, {word}, and {string} built-ins exist. All other 20.0.0
built-ins — {float}, {double}, {byte}, {short}, {long},
{biginteger}, {bigdecimal}, and the anonymous {} — are omitted: the
numeric ones need lookahead the regex crate lacks, and none is used by the
conformance corpus. Using one fails loudly at registration
(“Undefined parameter type {double}”), never silently misparses.
Structs§
- Argument
- One captured argument of a whole-string match.
- Compiled
Expression - A compiled cucumber expression.
- Expression
Error - An expression failed to compile.
- Parameter
Type Registry - Registry of parameter types (built-ins + author-defined custom types).
Functions§
- parameter_
type_ names - Parameter-type names in source order, read from the parsed AST (escaped
braces
\{...\}are literal text, not parameters).
Type Aliases§
- ParseFn
- A parameter-type transform. Receives the type’s regexp capture groups in
order (a group that did not participate arrives as
""— the closest&[&str]can come to Java’snull/Python’sNone); a regexp with no groups of its own receives the whole matched text as the single element. Mirrors Java’sCaptureGroupTransformer/ Python’sparse(*groups).