Struct rustc_trans::plugin::registry::RegistryExperimental [-]  [+] [src]

pub struct Registry {
    // some fields omitted
}

Structure used to register plugins.

A plugin registrar function takes an &mut Registry and should call methods to register its plugins.

This struct has public fields and other methods for use by rustc itself. They are not documented here, and plugin authors should not use them.

Methods

impl Registry

fn register_syntax_extension(&mut self, name: Name, extension: SyntaxExtension)

Register a syntax extension of any kind.

This is the most general hook into libsyntax's expansion behavior.

fn register_macro(&mut self, name: &str, expander: fn(&'cx mut ExtCtxt, Span, &[TokenTree]) -> Box<MacResult + 'cx>)

Register a macro of the usual kind.

This is a convenience wrapper for register_syntax_extension. It builds for you a NormalTT that calls expander, and also takes care of interning the macro's name.

fn register_lint_pass(&mut self, lint_pass: Box<LintPass + 'static>)

Register a compiler lint pass.

fn register_lint_group(&mut self, name: &'static str, to: Vec<&'static Lint>)

Register a lint group.