pub trait InlineMacro {
    // Required methods
    fn append_macro_code(
        &self,
        macro_expander_data: &mut InlineMacroExpanderData,
        db: &dyn SyntaxGroup,
        macro_arguments: &ExprList
    );
    fn is_bracket_type_allowed(
        &self,
        db: &dyn SyntaxGroup,
        macro_ast: &ExprInlineMacro
    ) -> bool;
}
Expand description

A trait for inline macros.

Required Methods§

source

fn append_macro_code( &self, macro_expander_data: &mut InlineMacroExpanderData, db: &dyn SyntaxGroup, macro_arguments: &ExprList )

A function that appends the expanded code of the macro to the result code.

source

fn is_bracket_type_allowed( &self, db: &dyn SyntaxGroup, macro_ast: &ExprInlineMacro ) -> bool

A function that returns true if the macro supports the given bracket type.

Implementors§