Add unifying #[dom_struct] attribute (fixes #3667)

This commit is contained in:
Manish Goregaokar 2014-10-15 14:25:02 +05:30
parent a6001329b8
commit c45550de73
2 changed files with 15 additions and 3 deletions

View file

@ -15,7 +15,7 @@ extern crate sync;
use rustc::lint::LintPassObject;
use rustc::plugin::Registry;
use syntax::ext::base::Decorator;
use syntax::ext::base::{Decorator, Modifier};
use syntax::parse::token::intern;
@ -25,9 +25,10 @@ mod jstraceable;
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
reg.register_syntax_extension(intern("dom_struct"), Modifier(box jstraceable::expand_dom_struct));
reg.register_syntax_extension(intern("jstraceable"), Decorator(box jstraceable::expand_jstraceable));
reg.register_lint_pass(box lints::TransmutePass as LintPassObject);
reg.register_lint_pass(box lints::UnrootedPass as LintPassObject);
reg.register_lint_pass(box lints::PrivatizePass as LintPassObject);
reg.register_syntax_extension(intern("jstraceable"), Decorator(box jstraceable::expand_jstraceable))
}