macro_rules! err_ctx {
($mast_forest:expr, $node:expr, $host:expr) => { ... };
($mast_forest:expr, $node:expr, $host:expr, $op_idx:expr) => { ... };
}
Expand description
Constructs an error context for the given node in the MAST forest.
When the no_err_ctx
feature is disabled, this macro returns a proper error context; otherwise,
it returns ()
. That is, this macro is designed to be zero-cost when the no_err_ctx
feature
is enabled.
Usage:
err_ctx!(mast_forest, node, source_manager)
- creates basic error contexterr_ctx!(mast_forest, node, source_manager, op_idx)
- creates error context with operation index