[][src]Enum lrpar::parser::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]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

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

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

Auto Trait Implementations

impl<StorageT> Send for Node<StorageT> where
    StorageT: Send

impl<StorageT> Sync for Node<StorageT> where
    StorageT: Sync

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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