Expand description
Public, fallible DOM layer over the internal panic-contract Ast.
Document is the single public, editable tree entry point. It wraps an
internal crate::ast::Ast, exposes read access through NodeRef
handles, and edits through fallible methods returning EditError – no
panic from the Ast layer ever reaches a Document caller on
user-input-driven paths.
§Structural validity vs semantic completeness
The wrapped Ast is always structurally valid. Whether the tree contains
crate::ast::Node::Error placeholders is a separate, O(1) property
exposed by Document::has_errors. A Document produced from a partial
parse (containing Error nodes) is read-only.
Re-exports§
pub use crate::ast::NodeKind;
Structs§
- Document
- Public, fallible, editable DOM over an internal
Ast. - Document
Id - Process-wide unique identity for a
Document. - NodeId
- Public node handle.
- NodeRef
- Read-only borrowed handle to a node within a
Document.
Enums§
- ArgRef
- Read-side view of one command/environment argument value.
- ArgValue
- Write-side command/environment argument value.
- Delimiter
Ref - Delimiter
Value - Public write-side delimiter value.
- Edit
Error - Fallible editing error from
Documentmutation APIs. - From
Syntax Error - Error from
Document::from_syntax. - Group
Kind Ref