expand_document
Stable function · Load-time lowering and templates
Tier: stable · Kind: function · Topic: Load-time lowering and templates
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
| not exported | expandDocument | expand_document | not exported | not exported |
Julia
Julia does not export this function.
TypeScript
function expandDocument<T extends object>(loaded: T): T
Fully expand every surviving apply_expression_template reference in a
document loaded by lowerExpressionTemplates
(Option B), producing
the Option-A image: every reference replaced by its expansion (pure
substitution to the acyclic fixpoint, §9.6.4 rule 2) and every per-component
expression_templates block stripped. Deterministic — the §9.7.3 DAG is
acyclic and substitution confluent, so expandDocument(load(f)) is
structurally equal to the pre-0.9.0 expanded form (the expanded*.esm
conformance oracle). Non-destructive: loaded is deep-cloned first. Mirrors
the Julia reference expand_document / Expand.
Python
expand_document(loaded: Any) -> Any
Fully expand every surviving apply_expression_template reference in a
document loaded by lower_expression_templates
(Option B),
producing the Option-A image: every reference replaced by its expansion
(pure substitution to the acyclic fixpoint, §9.6.4 rule 2) and every
per-component expression_templates block stripped. Deterministic — the
DAG is acyclic and substitution confluent, so the result is structurally
equal to the expanded*.esm conformance oracle (§9.6.7). Non-destructive: loaded is deep copied
first.
Rust
Rust does not export this function.
Go
Go does not export this function.