MCPcopy Create free account
hub / github.com/dtolnay/macro-string / eval

Function eval

tests/eval/eval.rs:7–13  ·  view source on GitHub ↗
(input: TokenStream)

Source from the content-addressed store, hash-verified

5
6#[proc_macro]
7pub fn eval(input: TokenStream) -> TokenStream {
8 let macro_string = parse_macro_input!(input as MacroString);
9 TokenStream::from(match macro_string.eval() {
10 Ok(value) => quote!(#value),
11 Err(err) => err.into_compile_error(),
12 })
13}

Callers

nothing calls this directly

Calls 1

evalMethod · 0.80

Tested by

no test coverage detected