Copy more doc comments to JS/TS files, unescape comments (#2070)

* Copy more doc comments to JS/TS files, unescape comments

* Move unescape code to macro-support
This commit is contained in:
0xd4d
2020-04-13 20:51:32 +02:00
committed by GitHub
parent fc86589715
commit 826538922f
10 changed files with 179 additions and 28 deletions

View File

@ -264,6 +264,7 @@ pub struct Enum {
pub struct Variant {
pub name: Ident,
pub value: u32,
pub comments: Vec<String>,
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]

View File

@ -227,6 +227,7 @@ fn shared_variant<'a>(v: &'a ast::Variant, intern: &'a Interner) -> EnumVariant<
EnumVariant {
name: intern.intern(&v.name),
value: v.value,
comments: v.comments.iter().map(|s| &**s).collect(),
}
}