Expand description
Dialect-spec parser dispatch.
This module is the single source of truth for dialect selection, in two layers:
dialect_for_tagsmaps legacyformat:*tags to a built-inDialectSpec— the back-compat path for catalog rows persisted before specs existed (and for models whose spec could not be derived).get_parserturns a resolved spec into a parser. Any spec drives the delimited parser; no spec means the identity passthrough.
Adding a new builtin dialect is one entry in dialect_for_tags (plus
its constant in super::tags). Template-derived dialects need no code
at all: detection persists a spec and it arrives here as Some.
No other crate looks at format:* tags for parser selection — they
resolve a spec (usually via ModelContext) and call get_parser. This
keeps the dialect surface area tightly contained and prevents drift
between callers.
Functions§
- dialect_
for_ tags - Map legacy
format:*tags to a built-inDialectSpec. - get_
parser - Pick a parser for a resolved dialect.