1 2 3 4 5 6 7 8 9 10
use proc_macro2::TokenStream; pub trait Compiler<T> { type Output: Compiled<T>; fn compile(&self) -> Self::Output; } pub trait Compiled<T> { fn emit(&self) -> TokenStream; }