Module macro_tools::exposed
source · Expand description
Exposed namespace of the module.
Re-exports§
pub use super::protected as attr;
pub use super::protected as container_kind;
pub use super::protected as diag;
pub use super::protected as generic_analyze;
pub use super::protected as generics;
pub use super::protected as name;
pub use super::protected as quantifier;
pub use super::protected as tokens;
pub use super::protected as typ;
pub use super::protected as type_struct;
Modules§
Macros§
- A type-macro that expands to the name of the Rust type representation of a given token.
- Parse a set of curly braces and expose their content to subsequent parsers.
- Parse a set of square brackets and expose their content to subsequent parsers.
- Macro for diagnostics purpose to diagnose source code behind it and export it into a string.
- Macro for diagnostics purpose to print both syntax tree and source code behind it without syntax tree.
- Macro to export source code behind a syntax tree into a string.
- Define a type that supports parsing and printing a given identifier as if it were a keyword.
- Define a type that supports parsing and printing a multi-character symbol as if it were a punctuation token.
- Formatting macro for constructing
Ident
s. - Parse a set of parentheses and expose their content to subsequent parsers.
- Parse the input TokenStream of a macro, triggering a compile error if the tokens fail to parse.
- Quasi-quotation macro that accepts input like the
quote!
macro but uses type inference to figure out a return type for those tokens. - Quasi-quotation macro that accepts input like the
quote!
macro but uses type inference to figure out a return type for those tokens. - This macro is
parse_quote!
+quote_spanned!
. - Macro to generate syn error either with span of a syntax tree element or with default one
proc_macro2::Span::call_site()
. - Macro to generate syn error either with span of a syntax tree element or with default one
proc_macro2::Span::call_site()
. - Macro for diagnostics purpose to export both syntax tree and source code behind it into a string.
- Macro for diagnostics purpose to print both syntax tree and source code behind it with syntax tree.
Structs§
- Attribute which is inner.
- Attribute which is outer.
- Represents an equation parsed from a procedural macro input.
- Result of generics analyze.
- Parse as much elements as possible.
- Pair of two elements of parsing.
Tokens
is a wrapper aroundproc_macro2::TokenStream
. It is designed to facilitate the parsing and manipulation of token streams within procedural macros.
Traits§
- Marker saying how to parse several elements of such type in a row.
- To analyze generics.
- Convert it into canonical interval.
- Interval adapter. Interface to interval-like structures.
- Trait to get name of an syntax element.
- Interval adapter. Interface to interval-like structures.
- A trait that can provide the
Span
of the complete contents of a syntax tree node.
Functions§
- Formats a debugging report for a pair of token streams, showing the original and generated code.
- Prints a debugging report for a pair of token streams to the standard output.
- For attribute like
#[former( default = 31 ) ]
return keydefault
and value31
, as well as syn::Meta as the last element of result tuple. - Checks if the given iterator of attributes contains an attribute named
debug
. - Adds indentation and optional prefix/postfix to each line of the given string.
Type Aliases§
- Attribute and ident.
- Input to a Syn parser function.
- Result with syn::Error.