[][src]Enum lrpar::Node

pub enum Node<StorageT> {
    Term {
        lexeme: Lexeme<StorageT>,
    },
    Nonterm {
        ridx: RIdx<StorageT>,
        nodes: Vec<Node<StorageT>>,
    },
}

A generic parse tree.

Variants

Term

Terminals store a single lexeme.

Fields of Term

lexeme: Lexeme<StorageT>
Nonterm

Nonterminals reference a rule and have zero or more Nodes as children.

Fields of Nonterm

ridx: RIdx<StorageT>nodes: Vec<Node<StorageT>>

Methods

impl<StorageT: 'static + PrimInt + Unsigned> Node<StorageT> where
    usize: AsPrimitive<StorageT>, 
[src]

pub fn pp(&self, grm: &YaccGrammar<StorageT>, input: &str) -> String[src]

Return a pretty-printed version of this node.

Trait Implementations

impl<StorageT: Clone> Clone for Node<StorageT>[src]

impl<StorageT: Debug> Debug for Node<StorageT>[src]

impl<StorageT: PartialEq> PartialEq<Node<StorageT>> for Node<StorageT>[src]

impl<StorageT> StructuralPartialEq for Node<StorageT>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err