Skip to content

Commit

Permalink
Merge pull request #1 from chancancode/content-tag
Browse files Browse the repository at this point in the history
Enable CI and fix clippy
  • Loading branch information
mansona authored Oct 3, 2023
2 parents 5477f2a + fa10571 commit 90d537c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- main
- content-tag

env:
CI: 1
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_ecma_parser/src/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ impl<'a> Lexer<'a> {
self.bump();
}
self.state.content_tag_template = ContentTagState::None;
return Ok(ContentTagEnd);
Ok(ContentTagEnd)
}

#[inline(never)]
Expand Down
9 changes: 3 additions & 6 deletions crates/swc_ecma_parser/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,7 @@ impl<I: Tokens> Parser<I> {
match bump!(self) {
Token::ContentTagContent { value } => {
let span = span!(self, start);
return Ok(ContentTagContent {
span,
value: value.into(),
});
Ok(ContentTagContent { span, value })
}
_ => {
unexpected!(self, "content tag");
Expand All @@ -541,12 +538,12 @@ impl<I: Tokens> Parser<I> {
let closing = ContentTagEnd {
span: span!(self, closing_start),
};
return Ok(ContentTagExpression {
Ok(ContentTagExpression {
span: span!(self, opening_start),
opening: opening.into(),
contents: contents.into(),
closing: closing.into(),
});
})
}

#[cfg_attr(feature = "debug", tracing::instrument(skip_all))]
Expand Down

0 comments on commit 90d537c

Please sign in to comment.