Macro macro_attr::macro_attr_callback
[−]
[src]
macro_rules! macro_attr_callback { ( ($cb:ident ! { $($cb_fixed:tt)* }), $($args:tt)* ) => { ... }; ( ($cb:ident ! [ $($cb_fixed:tt)* ]), $($args:tt)* ) => { ... }; ( ($cb:ident ! ( $($cb_fixed:tt)* )), $($args:tt)* ) => { ... }; }
This macro invokes a "callback" macro, merging arguments together.
It takes an arbitrary macro call (name!(args...))
, plus some sequence of new_args...
, and expands name!(args... new_args...)
.
Importantly, it works irrespective of the kind of grouping syntax used for the macro arguments, simplifying macros which need to capture callbacks.