Skip to content

Commit 574db30

Browse files
committed
ssr/replacing: Insert missing trailing semicolon for let statement
1 parent a87293b commit 574db30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/ssr/src/replacing.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ impl ReplacementRenderer<'_> {
7979
for node_or_token in node.children_with_tokens() {
8080
self.render_node_or_token(&node_or_token);
8181
}
82+
if let Some(let_stmt) = ast::LetStmt::cast(node.clone()) {
83+
if let_stmt.semicolon_token().is_none() {
84+
self.out.push(';');
85+
}
86+
}
8287
}
8388

8489
fn render_node_or_token(&mut self, node_or_token: &SyntaxElement) {

0 commit comments

Comments
 (0)