aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/lib.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2015-11-20 08:58:01 -0500
committerCorey Farwell <coreyf@rwell.org>2015-11-21 08:15:56 -0500
commitf34da4120d475f7fd78a647fc246e5731e7de941 (patch)
tree74a7ec75926296d7d0144563b736b8b6d97dfa29 /components/plugins/lib.rs
parent0146751bb227e577f54c4c0574ae36236e2bcdce (diff)
downloadservo-f34da4120d475f7fd78a647fc246e5731e7de941.tar.gz
servo-f34da4120d475f7fd78a647fc246e5731e7de941.zip
Implement 'url!(..)' macro
https://github.com/servo/rust-url/issues/136 https://github.com/servo/rust-url/pull/137
Diffstat (limited to 'components/plugins/lib.rs')
-rw-r--r--components/plugins/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/plugins/lib.rs b/components/plugins/lib.rs
index bb328c9441a..d52ad866879 100644
--- a/components/plugins/lib.rs
+++ b/components/plugins/lib.rs
@@ -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);