Skip to main content

Module syntax_node

Module syntax_node 

Source
Expand description

Lossless syntax tree snapshots used for serde and transport.

SyntaxNode is the parser’s immutable, lossless output shape. It is useful for JSON snapshots, Python dictionaries, JavaScript objects, and tests that need to inspect the parsed structure.

Editing is intentionally handled by texform::Document, not by SyntaxNode. Convert a syntax snapshot with Document::from_syntax when you need a live DOM-style tree, and call Document::to_syntax when you need to serialize or transport the current tree.

SyntaxNode::Error represents a parser recovery placeholder. It can appear in partial parse trees and preserves the original source snippet.

Structs§

Argument
Command or environment argument.

Enums§

ArgumentKind
Argument type.
ArgumentValue
Parsed argument value.
ContentMode
Content mode: math or text
Delimiter
Delimiter type for delimited groups
GroupKind
Group type for different grouping constructs
SyntaxNode
Immutable syntax tree node

Type Aliases§

ArgumentSlot
Optional slot for argument lists.