mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style_derive: Make parse derive work with C like enums.
This commit is contained in:
parent
f7440bf1a6
commit
3ad2687c0b
1 changed files with 2 additions and 1 deletions
|
@ -20,9 +20,10 @@ pub fn derive(input: DeriveInput) -> Tokens {
|
|||
);
|
||||
|
||||
let identifier = cg::to_css_identifier(variant.ident.as_ref());
|
||||
let ident = &variant.ident;
|
||||
match_body = quote! {
|
||||
#match_body
|
||||
#identifier => Ok(#name::#variant),
|
||||
#identifier => Ok(#name::#ident),
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue