Skip to main content

Module parser

Module parser 

Source
Expand description

Parser — KDL schema file → crate::ir::Schema.

Parsing happens in two stages:

  1. deserializeclub-kdl’s KdlDeserialize derive fills the KDL-shaped raw structs from the document.
  2. lowerraw structs are converted into the validated crate::ir representation: enum-like strings become real enums, the flat type string becomes a crate::ir::Ty, and channel semantics (datagram channel_id requirements) are checked.

Only the modern dialect is accepted — protocol / channel / request / returns / event / field, standalone struct / enum, and the entity dialect record / relation / id. Legacy service / method / send / recv constructs are not parsed.

Enums§

ParseError
An error produced while parsing a KDL schema.

Functions§

parse
Parse a KDL schema source string into a Schema. Pure text in, pure value out — no filesystem access, no directive resolution.
parse_doc
Parse an already-loaded kdl::KdlDocument into a Schema.
parse_path
Read a KDL schema file from disk, resolve every (<)file / (<)glob directive in it via kdl_compose::compose, then parse the composed document into a Schema.