Expand description
Parser module for formatparse-core Parse format patterns into regex strings and field specifications (pure Rust).
Constants§
- MAX_
NESTED_ FORMAT_ DEPTH - Maximum recursive depth when compiling nested format patterns (GitHub issue #12).
Functions§
- field_
types_ match - Check if two field types match (for repeated name validation)
- normalize_
field_ name - Normalize field name for use inside
(?P<name>...)capture groups. - parse_
field - Parse a single field specification from the pattern
- parse_
field_ path - Parse a field name into a path (for dict-style names like “hello[world]” -> [“hello”, “world”])
- parse_
format_ spec - Parse format specifier string into FieldSpec
- parse_
pattern - Parse a format pattern string into regex parts, field specs, and names
allow_empty_delimited_default_string: when false, default string fields always use.+?(used for the unanchored search regex so search/findall do not stop early). - validate_
multiline_ mvp - Reject
:ml/:blkcombined with numeric-only format specifiers (GitHub issues #8, #69, #70).
Type Aliases§
- Parsed
Pattern Parts - Result tuple from
parse_pattern: compiled pattern string, search regex string, field specs, original and normalized field names, normalized-to-original name map, and whether""may match when every field is a default unconstrained string.