pub type CstConstructError<E = Infallible> = ViewConstructionError<TerminalKind, NonTerminalKind, E>;Aliased Type§
pub enum CstConstructError<E = Infallible> {
UnexpectedNode {
node: CstNodeId,
data: CstNodeData<TerminalKind, NonTerminalKind>,
expected_kind: NodeKind<TerminalKind, NonTerminalKind>,
},
UnexpectedExtraNode {
node: CstNodeId,
},
UnexpectedEndOfChildren {
parent: CstNodeId,
},
UnexpectedEmptyChildren {
node: CstNodeId,
},
NodeIdNotFound {
node: CstNodeId,
},
Error(E),
}Variants§
UnexpectedNode
Expected a specific kind of terminal node, but got an invalid node
Fields
§
data: CstNodeData<TerminalKind, NonTerminalKind>The data of the node.
§
expected_kind: NodeKind<TerminalKind, NonTerminalKind>The expected kind.
UnexpectedExtraNode
Expected an extra node, but got an invalid node
UnexpectedEndOfChildren
Unexpected end of children
UnexpectedEmptyChildren
Unexpected empty children for a non-terminal
NodeIdNotFound
The node ID not found in the tree
Error(E)
Error that occurs when constructing a view from a NonTerminalHandle.