pub enum ParseTree<'a> {
Terminal(char),
NonTerminal {
symbol: &'a str,
children: Vec<ParseTree<'a>>,
},
}
Expand description
The results from a parsing of the input text
Variants
Terminal(char)
A single captured Unicode scalar value from the input
NonTerminal
Fields
symbol: &'a str
The name of the intermediary syntactic variable found
A recursive data structure to represent the current part of the parse tree
Trait Implementations
impl<'a> StructuralPartialEq for ParseTree<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for ParseTree<'a>
impl<'a> Send for ParseTree<'a>
impl<'a> Sync for ParseTree<'a>
impl<'a> Unpin for ParseTree<'a>
impl<'a> UnwindSafe for ParseTree<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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