Module diag

Source
Expand description

Macro helpers.

Re-exports§

pub use super::super::diag;

Modules§

exposed
Exposed namespace of the module.
orphan
Parented namespace of the module.
own
Own namespace of the module.
prelude
Prelude to use essentials: use my_module::prelude::*.

Macros§

code_diagnostics_str
Macro for diagnostics purpose to diagnose source code behind it and export it into a string.
code_print
Macro for diagnostics purpose to print both syntax tree and source code behind it without syntax tree.
code_to_str
Macro to export source code behind a syntax tree into a string.
return_syn_err
Macro to generate syn error either with span of a syntax tree element or with default one proc_macro2::Span::call_site().
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_diagnostics_str
Macro for diagnostics purpose to export both syntax tree and source code behind it into a string.
tree_print
Macro for diagnostics purpose to print both syntax tree and source code behind it with syntax tree.

Functions§

indentation
Adds indentation and optional prefix/postfix to each line of the given string.
report_format
Formats a debugging report for code transformation processes, detailing both the original and generated code for easy comparison and review.
report_print
Prints a debugging report for a pair of token streams to the standard output.