mod val;
mod methods;

use proc_macro::TokenStream;

#[proc_macro_derive(Val)]
pub fn derive_val(input: TokenStream) -> TokenStream {
    val::expand(input.into())
        .unwrap_or_else(|e| e.to_compile_error())
        .into()
}

#[proc_macro_attribute]
pub fn repl(_attr: TokenStream, input: TokenStream) -> TokenStream {
    methods::expand(input.into())
        .unwrap_or_else(|e| e.to_compile_error())
        .into()
}
