Skip to main content

tfparser_core/loader/
mod.rs

1//! HCL loader: read source files for a discovered component, parse them
2//! with `hcl-edit`, lower to our IR, and produce a [`RawComponent`].
3//!
4//! This module is the second cross-trust-boundary phase. Per
5//! [12-hcl-loader.md], the loader:
6//!
7//! - takes file size / block-count / depth caps as input;
8//! - never panics on adversarial bytes;
9//! - emits per-file diagnostics, never aborts the workspace on a single bad file;
10//! - drops the `hcl_edit` parse tree once lowering is complete (I-LOAD-2).
11//!
12//! [12-hcl-loader.md]: ../../../specs/12-hcl-loader.md
13
14mod limits;
15mod lowering;
16mod raw;
17mod source_map;
18mod traits;
19
20pub use limits::{LoaderLimits, LoaderLimitsBuilder};
21pub use raw::{RawBlock, RawComponent};
22pub use source_map::{LineCol, LineIndex, SourceMap};
23pub use traits::{HclEditLoader, LoadContext, Loader, ParseBytesResult};