Support Option with custom enums in JS

Find a hole automatically to use a sentinel value for `None`, and then
just wire everything up!

Closes #1198
This commit is contained in:
Alex Crichton
2019-01-28 14:12:02 -08:00
parent 03e52c7045
commit 9224455077
8 changed files with 119 additions and 5 deletions

View File

@ -207,6 +207,7 @@ pub struct Enum {
pub name: Ident,
pub variants: Vec<Variant>,
pub comments: Vec<String>,
pub hole: u32,
}
#[cfg_attr(feature = "extra-traits", derive(Debug, PartialEq, Eq))]