rimu_parse/compiler/mod.rs
1use chumsky::{prelude::Simple, Parser};
2use rimu_meta::Span;
3
4use crate::token::Token;
5
6mod block;
7mod expression;
8
9pub(crate) use block::compile_block;
10pub(crate) use expression::compile_expression;
11
12pub type CompilerError = Simple<Token, Span>;
13
14pub(crate) trait Compiler<T>:
15 Parser<Token, T, Error = CompilerError> + Sized + Clone
16{
17}
18impl<P, T> Compiler<T> for P where P: Parser<Token, T, Error = CompilerError> + Clone {}