initial commit

This commit is contained in:
Nikolay Volf
2016-04-20 14:17:11 +03:00
parent e149402d81
commit e0ae0724e2
6 changed files with 236 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ pub fn register(reg: &mut syntex::Registry) {
reg.add_attr("feature(custom_attribute)");
reg.add_decorator("derive_Ipc", codegen::expand_ipc_implementation);
reg.add_decorator("derive_Binary", serialization::expand_serialization_implementation);
}
#[cfg(not(feature = "with-syntex"))]
@@ -62,4 +63,8 @@ pub fn register(reg: &mut rustc_plugin::Registry) {
syntax::parse::token::intern("derive_Ipc"),
syntax::ext::base::MultiDecorator(
Box::new(codegen::expand_ipc_implementation)));
reg.register_syntax_extension(
syntax::parse::token::intern("derive_Binary"),
syntax::ext::base::MultiDecorator(
Box::new(serialization::expand_serialization_implementation)));
}