fn verify_args_text(args: proc_macro2::TokenStream) -> Vec<String> {
    let mut tokens = Vec::new();
    let mut illegal_str = None;
    for arg in args.into_iter() {
        tokens.push(arg.to_string());
        match arg {
            proc_macro2::TokenTree::Ident(_) => {}
            proc_macro2::TokenTree::Punct(pt) => {
                if pt.as_char() != ':' {
                    if illegal_str.is_none() {
                        illegal_str = Some(pt.to_string());
                    }
                }
            }
            _ => {
                if illegal_str.is_none() {
                    illegal_str = Some(arg.to_string());
                }
            }
        }
    }
    if let Some(x) = illegal_str {
        panic!("Illegal string: {}", x);
    }

    tokens
}
// TODO: Support more special characters e.g. '-' and '.' for target and prereq name
//       As of Mar 2021, Span::{start, end} are nightly and they return always 0 when called through proc_macro2.
//       Due to the restriction, there is no way to distinguish an isolated punctuation from one consisting of a
//       word. For example, today's TokenStream presents "abc.def" and "abc .def" in the same way. This TODO will
//       be revisited once the functions get supported (https://doc.rust-lang.org/proc_macro/struct.Span.html).
Support more special characters e.g. '-' and '.' for target and prereq name
As of Mar 2021, Span::{start, end} are nightly and they return always 0 when called through proc_macro2.
Due to the restriction, there is no way to distinguish an isolated punctuation from one consisting of a
word. For example, today's TokenStream presents "abc.def" and "abc .def" in the same way. This TODO will
be revisited once the functions get supported .
Support more special characters e . g . ' - ' and ' . ' for target and prereq name As of Mar 2021 Span :: { start end } are nightly and they return always 0 when called through proc_macro2 . Due to the restriction there is no way to distinguish an isolated punctuation from one consisting of a word . For example today ' s TokenStream presents " abc . def " and " abc . def " in the same way . This TODO will be revisited once the functions get supported .
fn verify_args_text(args: proc_macro2::TokenStream) -> Vec<String> {
    let mut tokens = Vec::new();
    let mut illegal_str = None;
    for arg in args.into_iter() {
        tokens.push(arg.to_string());
        match arg {
            proc_macro2::TokenTree::Ident(_) => {}
            proc_macro2::TokenTree::Punct(pt) => {
                if pt.as_char() != ':' {
                    if illegal_str.is_none() {
                        illegal_str = Some(pt.to_string());
                    }
                }
            }
            _ => {
                if illegal_str.is_none() {
                    illegal_str = Some(arg.to_string());
                }
            }
        }
    }
    if let Some(x) = illegal_str {
        panic!("Illegal string: {}", x);
    }
    tokens
}
fn verify_args_text ( args : proc_macro2 :: TokenStream ) -> Vec < String > { let mut tokens = Vec :: new ( ) ; let mut illegal_str = None ; for arg in args . into_iter ( ) { tokens . push ( arg . to_string ( ) ) ; match arg { proc_macro2 :: TokenTree :: Ident ( _ ) => { } proc_macro2 :: TokenTree :: Punct ( pt ) => { if pt . as_char ( ) != ':' { if illegal_str . is_none ( ) { illegal_str = Some ( pt . to_string ( ) ) ; } } } _ => { if illegal_str . is_none ( ) { illegal_str = Some ( arg . to_string ( ) ) ; } } } } if let Some ( x ) = illegal_str { panic ! ( " " x ) ; } tokens }
TODO: Support more special characters e.g.
TODO : Support more special characters e . g .
args
proc_macro2::TokenStream