Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(html/ast): Fix compilation #6211

Merged
merged 1 commit into from Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions crates/swc_html_ast/src/base.rs
Expand Up @@ -63,7 +63,6 @@ pub struct DocumentType {
pub public_id: Option<JsWord>,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub system_id: Option<JsWord>,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub raw: Option<Atom>,
}

Expand Down Expand Up @@ -126,11 +125,9 @@ pub struct Attribute {
pub prefix: Option<JsWord>,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub name: JsWord,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub raw_name: Option<Atom>,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub value: Option<JsWord>,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub raw_value: Option<Atom>,
}

Expand All @@ -149,7 +146,6 @@ pub struct Text {
pub span: Span,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub data: JsWord,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub raw: Option<Atom>,
}

Expand All @@ -165,7 +161,6 @@ pub struct Comment {
pub span: Span,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub data: JsWord,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub raw: Option<Atom>,
}

Expand Down
7 changes: 0 additions & 7 deletions crates/swc_html_ast/src/token.rs
Expand Up @@ -14,11 +14,9 @@ pub struct AttributeToken {
pub span: Span,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub name: JsWord,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub raw_name: Option<Atom>,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub value: Option<JsWord>,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
pub raw_value: Option<Atom>,
}

Expand Down Expand Up @@ -66,35 +64,30 @@ pub enum Token {
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
// System identifier
system_id: Option<JsWord>,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
// Raw value
raw: Option<Atom>,
},
StartTag {
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
tag_name: JsWord,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
raw_tag_name: Option<Atom>,
is_self_closing: bool,
attributes: Vec<AttributeToken>,
},
EndTag {
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
tag_name: JsWord,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
raw_tag_name: Option<Atom>,
is_self_closing: bool,
attributes: Vec<AttributeToken>,
},
Comment {
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
data: JsWord,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
raw: Option<Atom>,
},
Character {
value: char,
#[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))]
raw: Option<Raw>,
},
Eof,
Expand Down