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

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

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.

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

Modifier

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

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.

LetSyntaxTT

An ident macro that has two properties: - it adds a macro definition to the environment, and - the definition it adds doesn't introduce any new identifiers.

macro_rules! is a LetSyntaxTT