mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Implement 'url!(..)' macro
https://github.com/servo/rust-url/issues/136 https://github.com/servo/rust-url/pull/137
This commit is contained in:
parent
0146751bb2
commit
f34da4120d
30 changed files with 346 additions and 128 deletions
|
@ -26,6 +26,8 @@ extern crate tenacious;
|
|||
#[cfg(feature = "clippy")]
|
||||
extern crate clippy;
|
||||
|
||||
extern crate url;
|
||||
|
||||
use rustc::plugin::Registry;
|
||||
use syntax::ext::base::*;
|
||||
use syntax::feature_gate::AttributeType::Whitelisted;
|
||||
|
@ -41,6 +43,7 @@ pub mod lints;
|
|||
pub mod reflector;
|
||||
/// Utilities for writing plugins
|
||||
pub mod casing;
|
||||
mod url_plugin;
|
||||
pub mod utils;
|
||||
|
||||
#[plugin_registrar]
|
||||
|
@ -51,6 +54,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
|
|||
reg.register_syntax_extension(intern("derive_HeapSizeOf"), MultiDecorator(box heap_size::expand_heap_size));
|
||||
reg.register_macro("to_lower", casing::expand_lower);
|
||||
reg.register_macro("to_upper", casing::expand_upper);
|
||||
reg.register_macro("url", url_plugin::expand_url);
|
||||
reg.register_late_lint_pass(box lints::transmute_type::TransmutePass);
|
||||
reg.register_late_lint_pass(box lints::unrooted_must_root::UnrootedPass::new());
|
||||
reg.register_late_lint_pass(box lints::privatize::PrivatizePass);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue