mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style_derive: Support parse-time aliases.
This will allow #19659 to use derive on display using: #[parse(aliases = "-webkit-flex")] Flex, #[parse(aliases = "-webkit-inline-flex")] InlineFlex, And such.
This commit is contained in:
parent
0af7ac6a4a
commit
537fda543e
2 changed files with 23 additions and 1 deletions
|
@ -39,7 +39,7 @@ pub fn derive_to_animated_value(stream: TokenStream) -> TokenStream {
|
|||
to_animated_value::derive(input).to_string().parse().unwrap()
|
||||
}
|
||||
|
||||
#[proc_macro_derive(Parse)]
|
||||
#[proc_macro_derive(Parse, attributes(parse))]
|
||||
pub fn derive_parse(stream: TokenStream) -> TokenStream {
|
||||
let input = syn::parse_derive_input(&stream.to_string()).unwrap();
|
||||
parse::derive(input).to_string().parse().unwrap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue