Crate wproc_macro

Source
Expand description

Tools for writing procedural macroses.

Macros§

syn_err
Macro to generate syn error either with span of a syntax tree element or with default one proc_macro2::Span::call_site().
tree_export_str
Macro for diagnostics purpose to export both syntax tree and source code behind it into string.
tree_print
Macro for diagnostics purpose to print both syntax tree and source code behind it.

Enums§

ContainerKind
Kind of container.

Functions§

attr_pair_single
For attribute like #[former( default = 31 )] return key default and value 31, as well as syn::Meta as the last element of result tuple.
type_container_kind
Return kind of container specified by type.
type_optional_container_kind
Return kind of container specified by type. Unlike type_container_kind it also understand optional types.
type_parameters
Return the specified number of parameters of the type.
type_rightmost
Check is the rightmost item of path refering a type is specified type.