File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ use swc_common:: Spanned ;
12use swc_ecma_ast:: NewExpr ;
23
34use crate :: convert_ast:: annotations:: AnnotationKind ;
@@ -13,8 +14,9 @@ impl AstConverter<'_> {
1314 & TYPE_NEW_EXPRESSION ,
1415 & new_expression. span ,
1516 NEW_EXPRESSION_RESERVED_BYTES ,
16- false ,
17+ true ,
1718 ) ;
19+ self . move_to_specific_index ( new_expression. callee . span_lo ( ) . 0 - 2 ) ;
1820 // annotations
1921 let annotations = self
2022 . index_converter
Original file line number Diff line number Diff line change @@ -795,6 +795,10 @@ impl<'a> AstConverter<'a> {
795795 }
796796 }
797797 }
798+
799+ pub ( crate ) fn move_to_specific_index ( & mut self , index : u32 ) {
800+ self . index_converter . convert ( index, false ) ;
801+ }
798802}
799803
800804pub ( crate ) fn convert_annotation ( buffer : & mut Vec < u8 > , annotation : & ConvertedAnnotation ) {
Original file line number Diff line number Diff line change 1717( /*@__PURE__ */ p . x ( 1 ) . y ( 2 ) . z ( 3 ) ) ;
1818[ /*@__PURE__ */ q ( ) ] ;
1919/*@__PURE__ */ new r ( ) ;
20+ new /*@__PURE__ */ r ( ) ;
2021/*@__PURE__ */ ( new s ( ) ) ;
2122( /*@__PURE__ */ new t ( ) ) ;
2223/*@__PURE__ */ new u ( 1 ) ( 2 ) ( 3 ) ;
You can’t perform that action at this time.
0 commit comments