Skip to content

Commit

Permalink
Merge pull request #2 from patricklx/content-tag
Browse files Browse the repository at this point in the history
do not flatten ContentTagMember attrs
  • Loading branch information
ef4 authored Dec 12, 2023
2 parents ac6123f + a74ccdd commit add537f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions crates/swc_ecma_ast/src/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,13 @@ impl Take for Class {
pub struct ContentTagMember {
pub span: Span,

#[cfg_attr(feature = "serde-impl", serde(flatten))]
#[span]
#[cfg_attr(feature = "serde-impl", serde())]
pub opening: Box<ContentTagStart>,

#[cfg_attr(feature = "serde-impl", serde(flatten))]
#[span]
#[cfg_attr(feature = "serde-impl", serde())]
pub contents: Box<ContentTagContent>,

#[cfg_attr(feature = "serde-impl", serde(flatten))]
#[span]
#[cfg_attr(feature = "serde-impl", serde())]
pub closing: Box<ContentTagEnd>,
}

Expand Down
9 changes: 3 additions & 6 deletions crates/swc_ecma_ast/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,16 +527,13 @@ pub struct FnExpr {
pub struct ContentTagExpression {
pub span: Span,

#[cfg_attr(feature = "serde-impl", serde(flatten))]
#[span]
#[cfg_attr(feature = "serde-impl", serde())]
pub opening: Box<ContentTagStart>,

#[cfg_attr(feature = "serde-impl", serde(flatten))]
#[span]
#[cfg_attr(feature = "serde-impl", serde())]
pub contents: Box<ContentTagContent>,

#[cfg_attr(feature = "serde-impl", serde(flatten))]
#[span]
#[cfg_attr(feature = "serde-impl", serde())]
pub closing: Box<ContentTagEnd>,
}

Expand Down

0 comments on commit add537f

Please sign in to comment.