WebIDL: Handle Invalid Enum Returns (#477)

* move ImportEnum attributes to a property

* borrow from_js_value argument

* make WebIDL enums non-exhaustive

* add more tests for WebIDL enums
This commit is contained in:
Stephan Wolski
2018-07-23 11:04:28 -04:00
committed by Alex Crichton
parent 5fddcf3868
commit b3ee71c20b
4 changed files with 144 additions and 20 deletions

View File

@ -112,6 +112,8 @@ pub struct ImportEnum {
pub variants: Vec<Ident>,
/// The JS string values of the variants
pub variant_values: Vec<String>,
/// Attributes to apply to the Rust enum
pub rust_attrs: Vec<syn::Attribute>,
}
#[cfg_attr(feature = "extra-traits", derive(Debug, PartialEq, Eq))]