Make #[derive(JSTraceable)] a procedural macro

This commit is contained in:
Anthony Ramine 2016-11-02 22:43:37 +01:00
parent b0cac458b6
commit 391296278d
9 changed files with 98 additions and 68 deletions

View file

@ -25,7 +25,6 @@ extern crate rustc;
extern crate rustc_plugin;
#[macro_use]
extern crate syntax;
extern crate syntax_ext;
use rustc_plugin::Registry;
use syntax::ext::base::*;
@ -44,8 +43,6 @@ mod utils;
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
reg.register_syntax_extension(intern("dom_struct"), MultiModifier(box jstraceable::expand_dom_struct));
reg.register_syntax_extension(intern("derive_JSTraceable"),
MultiDecorator(box jstraceable::expand_jstraceable));
reg.register_syntax_extension(intern("_generate_reflector"),
MultiDecorator(box reflector::expand_reflector));
reg.register_late_lint_pass(box lints::unrooted_must_root::UnrootedPass::new());