mpl 0.3.1

One-rule TDPL/PEG parsing language with a static-codegen backend (FastParse) that beats pest, peg, nom, winnow, and chumsky on equal-work benchmarks.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Output

use crate::trees::{AST, CST};

/// Output types.
pub trait Output<'i, I: ?Sized, V, S>: Sized {
    fn output_ast(input: &'i I, cst: CST<V, S, Self>) -> AST<V, S, Self>;
}

impl<'i, I: ?Sized, V, S> Output<'i, I, V, S> for () {
    fn output_ast(_input: &'i I, cst: CST<V, S, Self>) -> AST<V, S, Self> {
        AST::from_cst(cst)
    }
}