Trait rustemo::Builder

source ·
pub trait Builder {
    type Output;

    // Required method
    fn get_result(&mut self) -> Self::Output;
}
Expand description

Builds output during parsing by using semantic actions.

This trait is implemented by types that are in charge of building output of the parsing process (e.g. a parse tree).

Required Associated Types§

source

type Output

A type produced by this builder. See get_result.

Required Methods§

source

fn get_result(&mut self) -> Self::Output

Returns the product of parsing. Usually the one and only element left on the result stack.

Implementors§

source§

impl<'i, I> Builder for SliceBuilder<'i, I>
where I: Input + ?Sized,

source§

impl<'i, I, P, TK> Builder for TreeBuilder<'i, I, P, TK>
where I: Input + ?Sized,

§

type Output = TreeNode<'i, I, P, TK>