Enum syntax::ext::base::SyntaxExtensionUnstable [-] [+] [src]

pub enum SyntaxExtension {
    Decorator(Box<ItemDecorator + 'static>),
    Modifier(Box<ItemModifier + 'static>),
    MultiModifier(Box<MultiItemModifier + 'static>),
    NormalTT(Box<TTMacroExpander + 'static>, Option<Span>),
    IdentTT(Box<IdentMacroExpander + 'static>, Option<Span>),
    MacroRulesTT,
}

An enum representing the different kinds of syntax extensions.

Variants

Decorator

A syntax extension that is attached to an item and creates new items based upon it.

#[derive(...)] is an ItemDecorator.

Modifier

A syntax extension that is attached to an item and modifies it in-place.

MultiModifier

A syntax extension that is attached to an item and modifies it in-place. More flexible version than Modifier.

NormalTT

A normal, function-like syntax extension.

bytes! is a NormalTT.

IdentTT

A function-like syntax extension that has an extra ident before the block.

MacroRulesTT

Represents macro_rules! itself.