@@ -264,6 +264,8 @@ where
264264 ModuleExportName :: Str ( ..) => {
265265 unimplemented ! ( "module string names unimplemented" )
266266 }
267+ #[ cfg( swc_ast_unknown) ]
268+ _ => panic ! ( "unable to access unknown nodes" ) ,
267269 } ;
268270
269271 let id: Id = exported. into ( ) ;
@@ -286,9 +288,13 @@ where
286288 ModuleExportName :: Str ( ..) => {
287289 unimplemented ! ( "module string names unimplemented" )
288290 }
291+ #[ cfg( swc_ast_unknown) ]
292+ _ => panic ! ( "unable to access unknown nodes" ) ,
289293 }
290294 }
291295 }
296+ #[ cfg( swc_ast_unknown) ]
297+ _ => panic ! ( "unable to access unknown nodes" ) ,
292298 }
293299 }
294300 }
@@ -380,11 +386,15 @@ where
380386 Expr :: Call ( CallExpr { callee, .. } ) => match callee {
381387 Callee :: Super ( _) | Callee :: Import ( _) => continue ,
382388 Callee :: Expr ( v) => v,
389+ #[ cfg( swc_ast_unknown) ]
390+ _ => panic ! ( "unable to access unknown nodes" ) ,
383391 } ,
384392 Expr :: Await ( AwaitExpr { arg, .. } ) => match & mut * * arg {
385393 Expr :: Call ( CallExpr { callee, .. } ) => match callee {
386394 Callee :: Super ( _) | Callee :: Import ( _) => continue ,
387395 Callee :: Expr ( v) => v,
396+ #[ cfg( swc_ast_unknown) ]
397+ _ => panic ! ( "unable to access unknown nodes" ) ,
388398 } ,
389399 _ => continue ,
390400 } ,
@@ -518,6 +528,8 @@ where
518528 ModuleExportName :: Str ( ..) => {
519529 unimplemented ! ( "module string names unimplemented" )
520530 }
531+ #[ cfg( swc_ast_unknown) ]
532+ _ => panic ! ( "unable to access unknown nodes" ) ,
521533 } ;
522534 // Default is not exported via `export *`
523535 if & * exported. sym == "default" {
@@ -613,6 +625,8 @@ where
613625 ModuleExportName :: Str ( ..) => {
614626 unimplemented ! ( "module string names unimplemented" )
615627 }
628+ #[ cfg( swc_ast_unknown) ]
629+ _ => panic ! ( "unable to access unknown nodes" ) ,
616630 } ;
617631 new. push (
618632 imported
@@ -665,6 +679,8 @@ where
665679 ) ;
666680 }
667681 }
682+ #[ cfg( swc_ast_unknown) ]
683+ _ => panic ! ( "unable to access unknown nodes" ) ,
668684 }
669685 }
670686
@@ -754,6 +770,8 @@ where
754770 }
755771 }
756772 DefaultDecl :: TsInterfaceDecl ( _) => continue ,
773+ #[ cfg( swc_ast_unknown) ]
774+ _ => panic ! ( "unable to access unknown nodes" ) ,
757775 }
758776
759777 // Create `export { local_default as default }`
@@ -926,6 +944,8 @@ where
926944 | Decl :: TsEnum ( _)
927945 | Decl :: TsModule ( _)
928946 | Decl :: Using ( ..) => continue ,
947+ #[ cfg( swc_ast_unknown) ]
948+ _ => panic ! ( "unable to access unknown nodes" ) ,
929949 } ;
930950
931951 tracing:: trace!(
@@ -1023,6 +1043,8 @@ where
10231043 "module string names unimplemented"
10241044 )
10251045 }
1046+ #[ cfg( swc_ast_unknown) ]
1047+ _ => panic ! ( "unable to access unknown nodes" ) ,
10261048 } ;
10271049 }
10281050 ExportSpecifier :: Default ( s) => {
@@ -1069,6 +1091,8 @@ where
10691091 definite : Default :: default ( ) ,
10701092 } ) ;
10711093 }
1094+ #[ cfg( swc_ast_unknown) ]
1095+ _ => panic ! ( "unable to access unknown nodes" ) ,
10721096 }
10731097 }
10741098
@@ -1101,6 +1125,8 @@ where
11011125 ModuleExportName :: Str ( ..) => {
11021126 unimplemented ! ( "module string names unimplemented" )
11031127 }
1128+ #[ cfg( swc_ast_unknown) ]
1129+ _ => panic ! ( "unable to access unknown nodes" ) ,
11041130 } ;
11051131 let orig_ident = match orig {
11061132 ModuleExportName :: Ident ( ident) => ident,
@@ -1202,6 +1228,8 @@ where
12021228 ModuleExportName :: Str ( ..) => {
12031229 unimplemented ! ( "module string names unimplemented" )
12041230 }
1231+ #[ cfg( swc_ast_unknown) ]
1232+ _ => panic ! ( "unable to access unknown nodes" ) ,
12051233 }
12061234 }
12071235 }
@@ -1262,6 +1290,8 @@ where
12621290 ModuleExportName :: Str ( ..) => {
12631291 unimplemented ! ( "module string names unimplemented" )
12641292 }
1293+ #[ cfg( swc_ast_unknown) ]
1294+ _ => panic ! ( "unable to access unknown nodes" ) ,
12651295 } ;
12661296 vars. push ( (
12671297 module_id,
@@ -1317,6 +1347,8 @@ where
13171347 continue ;
13181348 }
13191349 }
1350+ #[ cfg( swc_ast_unknown) ]
1351+ _ => panic ! ( "unable to access unknown nodes" ) ,
13201352 }
13211353 }
13221354
0 commit comments