pub enum Node<StorageT> {
Term {
lexeme: Lexeme<StorageT>,
},
Nonterm {
ridx: RIdx<StorageT>,
nodes: Vec<Node<StorageT>>,
},
}
Expand description
A generic parse tree.
Variants
Term
Fields
lexeme: Lexeme<StorageT>
Terminals store a single lexeme.
Nonterm
Nonterminals reference a rule and have zero or more Node
s as children.
Implementations
Trait Implementations
sourceimpl<StorageT: PartialEq> PartialEq<Node<StorageT>> for Node<StorageT>
impl<StorageT: PartialEq> PartialEq<Node<StorageT>> for Node<StorageT>
impl<StorageT> StructuralPartialEq for Node<StorageT>
Auto Trait Implementations
impl<StorageT> RefUnwindSafe for Node<StorageT>where
StorageT: RefUnwindSafe,
impl<StorageT> Send for Node<StorageT>where
StorageT: Send,
impl<StorageT> Sync for Node<StorageT>where
StorageT: Sync,
impl<StorageT> Unpin for Node<StorageT>where
StorageT: Unpin,
impl<StorageT> UnwindSafe for Node<StorageT>where
StorageT: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more