Skip to main content

mx20022_codegen/ir/
mod.rs

1//! Intermediate representation (IR) for ISO 20022 schema types.
2//!
3//! The IR is the bridge between the raw XSD AST produced by [`crate::xsd`]
4//! and the Rust token stream emitted by [`crate::emit`].  It is deliberately
5//! closer to Rust than to XSD, making the emitter simple.
6//!
7//! # Entry points
8//!
9//! - [`lower::lower`] — convert an [`xsd::Schema`] into a [`TypeGraph`].
10//! - [`TypeGraph`], [`TypeDef`] and related types — the IR data model.
11//!
12//! [`xsd::Schema`]: crate::xsd::Schema
13
14pub mod lower;
15pub mod types;
16
17pub use lower::{lower, LowerError};
18pub use types::{
19    AttrDef, Cardinality, CodeEnumDef, CodeValue, Constraint, EnumDef, FieldDef, NewtypeDef,
20    OpaqueDef, RootElement, RustType, StructDef, TypeDef, TypeGraph, TypeRef, ValueWithAttrDef,
21    VariantDef,
22};