mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Add #[jstraceable] syntax extension
This commit is contained in:
parent
27f3bcd718
commit
3b7e07699e
2 changed files with 81 additions and 3 deletions
|
@ -6,8 +6,6 @@
|
|||
|
||||
#![deny(unused_imports, unused_variable)]
|
||||
|
||||
|
||||
|
||||
#[phase(plugin,link)]
|
||||
extern crate syntax;
|
||||
#[phase(plugin, link)]
|
||||
|
@ -17,14 +15,18 @@ extern crate sync;
|
|||
|
||||
use rustc::lint::LintPassObject;
|
||||
use rustc::plugin::Registry;
|
||||
use syntax::ext::base::ItemDecorator;
|
||||
|
||||
use syntax::parse::token::intern;
|
||||
|
||||
mod lints;
|
||||
mod macros;
|
||||
|
||||
mod jstraceable;
|
||||
|
||||
#[plugin_registrar]
|
||||
pub fn plugin_registrar(reg: &mut Registry) {
|
||||
reg.register_lint_pass(box lints::TransmutePass as LintPassObject);
|
||||
reg.register_lint_pass(box lints::UnrootedPass as LintPassObject);
|
||||
reg.register_syntax_extension(intern("jstraceable"), ItemDecorator(box jstraceable::expand_jstraceable))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue