mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Add unifying #[dom_struct] attribute (fixes #3667)
This commit is contained in:
parent
a6001329b8
commit
c45550de73
2 changed files with 15 additions and 3 deletions
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue