Attribute Macro node_impl

Source
#[node_impl]
Expand description

§Example

impl MacroNode for ParamOrTsParamProp {
    fn emit(&mut self, emitter: &mut Macro) -> Result {
        match self {
            ParamOrTsParamProp::Param(n) => emit!(n),
            ParamOrTsParamProp::TsParamProp(n) => emit!(n),
        }
    }
}

§emit!().

emit!() macro in #[node_impl] functions are special.

Those are replaced with emit_with and adjust_span methods, depending on the context.