Function macro_magic_core::with_custom_parsing_internal

source ยท
pub fn with_custom_parsing_internal<T1: Into<TokenStream>, T2: Into<TokenStream>>(
    attr: T1,
    tokens: T2,
    import_tokens_attr_name: &'static str,
) -> Result<TokenStream>
Expand description

The internal implementation for the #[with_custom_parsing(..) attribute macro.

Note that this implementation just does parsing and re-orders the attributes of the attached proc macro attribute definition such that the #[import_tokens_attr] attribute comes before this attribute. The real implementation for #[with_custom_parsing(..)] can be found in import_tokens_attr_internal. The purpose of this is to allow programmers to use either ordering and still have the proper compiler errors when something is invalid.

The import_tokens_att_name argument is used when generating error messages and matching against the #[import_tokens_attr] macro this is to be used with. If you use a renamed/rebranded version of #[import_tokens_attr], you should change this value to match the name of your macro.