sci-units-proc-macro 0.6.0
“Procedural macros for use with sci-units.”
Contains an unbounded block loopNear-zero recent downloads for registry package
SHA-256a81de5d01b89c59dce45e4d9808ac11dfc85b03ce30ed8c2a02e36cd73d4ef61
MaleculeO(S)H(Db)Md
Evidence
1extern crate proc_macro;
2
3use proc_macro::TokenStream;
4use syn::parse::{Parse, ParseStream};
5use syn::{DeriveInput, Token};
6
7struct Parameters {
⋯5 lines
23:9… .1
24 .clone()
25 }
26}
27
28impl Parse for Parameters {
29 fn parse(input: ParseStream) -> syn::Result<Self> {
30 let content;
31
32 …
32:32… tent in input);
33 let mut result = Parameters { parameters: vec![] };
34
35 loop {
36 let key: syn::Ident = content.parse()?;
⋯2 lines
52:24… esentation of Rust code as a syntax tree
53 // that we can manipulate
54 let ast: DeriveInput = syn::parse(input).unwrap();
55 // Build the trait implementation
56 impl_display_macro(&ast)
57}
58
59#[proc_macro_derive(SiAddSubtract)]
60pub fn …
No evidence locations were recorded for this file. Raw result