zerodds_idl_lower/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 ZeroDDS Contributors
3//! Crate `zerodds-idl-lower`. Safety classification: **SAFE**.
4//!
5//! Lowers the IDL CST into the common AST: scopes and name binding,
6//! resolution, and the IDL rules the model cannot express structurally.
7//!
8//! A name that cannot be resolved yet becomes a pending reference rather
9//! than an error — the model is built for partial knowledge, and forward
10//! declarations depend on it.
11//!
12//! ## Spec
13//!
14//! - `docs/specs/zerodds-idl-frontend-1.0.md` §4 (lowering), §5
15//! (completion), §6 (validation).
16//! - `docs/specs/zerodds-ast-1.0.md` §2 (references), §5 (transactions).
17//!
18//! ## Layer position
19//!
20//! Layer 2 of the frontend — over `zerodds-idl-parse` and `zerodds-ast`.
21#![no_std]
22#![forbid(unsafe_code)]
23
24extern crate alloc;
25
26#[cfg(test)]
27extern crate std;
28
29mod annotation;
30pub mod complete;
31mod expr;
32mod lower;
33pub mod scope;
34pub mod validate;
35
36pub use annotation::verbatim_placement;
37pub use complete::hashed_member_id;
38pub use lower::{
39 HashedIdCounter, HashedNameSpelling, KeyOnUnionDiscriminator, Lowered, NameOfTheEnclosingScope,
40 Options, lower, lower_into, lower_into_with, lower_with,
41};
42pub use scope::ScopeStack;
43pub use validate::rule_name;