Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..d332303 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,10 @@ +#![feature(if_let_guard, proc_macro_quote)] +mod run; +use std::ffi::CString; + +use proc_macro::TokenStream; +use syn::Lit; +#[proc_macro] +pub fn eval(i: TokenStream) -> TokenStream { + run::exec(&CString::new(i.to_string()).unwrap()).into() +} |