mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Derive ComputeSquaredDistance
This commit is contained in:
parent
51b740033b
commit
277351da35
22 changed files with 162 additions and 391 deletions
|
@ -9,11 +9,18 @@ extern crate synstructure;
|
|||
|
||||
use proc_macro::TokenStream;
|
||||
|
||||
mod compute_squared_distance;
|
||||
mod has_viewport_percentage;
|
||||
mod to_animated_value;
|
||||
mod to_computed_value;
|
||||
mod to_css;
|
||||
|
||||
#[proc_macro_derive(ComputeSquaredDistance)]
|
||||
pub fn derive_compute_squared_distance(stream: TokenStream) -> TokenStream {
|
||||
let input = syn::parse_derive_input(&stream.to_string()).unwrap();
|
||||
compute_squared_distance::derive(input).to_string().parse().unwrap()
|
||||
}
|
||||
|
||||
#[proc_macro_derive(HasViewportPercentage)]
|
||||
pub fn derive_has_viewport_percentage(stream: TokenStream) -> TokenStream {
|
||||
let input = syn::parse_derive_input(&stream.to_string()).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue