ReadonlybodyReadonlysourceThe SourceFile wrapping the original input (unchanged by edits —
the live CST stays in body).
Remove an attribute or block at path. Returns true when something
was removed, false when the path did not resolve.
Resolve a path to its CST node. Returns undefined if the path does
not exist. For duplicate-block groups with no numeric index given,
returns the first matching block (matching HCL.parse's grouping
semantics when accessing by key).
Replace the value of an existing attribute, or insert a new attribute at the end of the enclosing body. The attribute's surrounding trivia (leading comments, same-line trailing comments) is preserved on replacement.
Re-emit the current CST. For an unedited Document, this is byte-identical to the original source by construction.
Convert the CST to the same Value shape that HCL.parse returns.
Mutable CST root. Edits to the body (via the editing API or by direct mutation) show up in subsequent
toString()/toValue()calls.