@@ -294,7 +294,7 @@ fn collect_insertions(node: &SyntaxNode, nesting_depth: u32) -> InsertionList {
294294 Some ( name) => {
295295 insertions. push_back ( Insertion :: new ( name. text_range ( ) . end ( ) , "__" ) ) ;
296296 insertions. push_back ( Insertion :: new_dynamic ( range. end ( ) ,
297- [ ";\n _cr = " , name. text ( ) , " = " , name. text ( ) , "__" ] . concat ( )
297+ [ ";\n _cr = " , name. text ( ) , " = " , name. text ( ) , "__; \n " ] . concat ( )
298298 ) ) ;
299299 insertions. add_variable ( name. to_string ( ) ) ;
300300 }
@@ -372,7 +372,7 @@ fn collect_insertions(node: &SyntaxNode, nesting_depth: u32) -> InsertionList {
372372 }
373373 insertions. append ( child_insertions) ;
374374 if let Some ( end) = expr_range. map ( |r| r. end ( ) ) {
375- insertions. push_back ( Insertion :: new ( end, ")" ) ) ;
375+ insertions. push_back ( Insertion :: new ( end, "); " ) ) ;
376376 }
377377 continue ;
378378 }
@@ -473,7 +473,7 @@ fn collect_insertions(node: &SyntaxNode, nesting_depth: u32) -> InsertionList {
473473 if is_returned_expression && !is_expr_in_async_function {
474474 insertions. push_back ( Insertion :: new (
475475 range. end ( ) ,
476- "), _functionState === 'async' ? _synchronousReturnValue : null)"
476+ "), _functionState === 'async' ? _synchronousReturnValue : null); "
477477 ) ) ;
478478 }
479479 }
0 commit comments