@@ -264,6 +264,8 @@ where
264
264
ModuleExportName :: Str ( ..) => {
265
265
unimplemented ! ( "module string names unimplemented" )
266
266
}
267
+ #[ cfg( swc_ast_unknown) ]
268
+ _ => panic ! ( "unable to access unknown nodes" ) ,
267
269
} ;
268
270
269
271
let id: Id = exported. into ( ) ;
@@ -286,9 +288,13 @@ where
286
288
ModuleExportName :: Str ( ..) => {
287
289
unimplemented ! ( "module string names unimplemented" )
288
290
}
291
+ #[ cfg( swc_ast_unknown) ]
292
+ _ => panic ! ( "unable to access unknown nodes" ) ,
289
293
}
290
294
}
291
295
}
296
+ #[ cfg( swc_ast_unknown) ]
297
+ _ => panic ! ( "unable to access unknown nodes" ) ,
292
298
}
293
299
}
294
300
}
@@ -380,11 +386,15 @@ where
380
386
Expr :: Call ( CallExpr { callee, .. } ) => match callee {
381
387
Callee :: Super ( _) | Callee :: Import ( _) => continue ,
382
388
Callee :: Expr ( v) => v,
389
+ #[ cfg( swc_ast_unknown) ]
390
+ _ => panic ! ( "unable to access unknown nodes" ) ,
383
391
} ,
384
392
Expr :: Await ( AwaitExpr { arg, .. } ) => match & mut * * arg {
385
393
Expr :: Call ( CallExpr { callee, .. } ) => match callee {
386
394
Callee :: Super ( _) | Callee :: Import ( _) => continue ,
387
395
Callee :: Expr ( v) => v,
396
+ #[ cfg( swc_ast_unknown) ]
397
+ _ => panic ! ( "unable to access unknown nodes" ) ,
388
398
} ,
389
399
_ => continue ,
390
400
} ,
@@ -518,6 +528,8 @@ where
518
528
ModuleExportName :: Str ( ..) => {
519
529
unimplemented ! ( "module string names unimplemented" )
520
530
}
531
+ #[ cfg( swc_ast_unknown) ]
532
+ _ => panic ! ( "unable to access unknown nodes" ) ,
521
533
} ;
522
534
// Default is not exported via `export *`
523
535
if & * exported. sym == "default" {
@@ -613,6 +625,8 @@ where
613
625
ModuleExportName :: Str ( ..) => {
614
626
unimplemented ! ( "module string names unimplemented" )
615
627
}
628
+ #[ cfg( swc_ast_unknown) ]
629
+ _ => panic ! ( "unable to access unknown nodes" ) ,
616
630
} ;
617
631
new. push (
618
632
imported
@@ -665,6 +679,8 @@ where
665
679
) ;
666
680
}
667
681
}
682
+ #[ cfg( swc_ast_unknown) ]
683
+ _ => panic ! ( "unable to access unknown nodes" ) ,
668
684
}
669
685
}
670
686
@@ -754,6 +770,8 @@ where
754
770
}
755
771
}
756
772
DefaultDecl :: TsInterfaceDecl ( _) => continue ,
773
+ #[ cfg( swc_ast_unknown) ]
774
+ _ => panic ! ( "unable to access unknown nodes" ) ,
757
775
}
758
776
759
777
// Create `export { local_default as default }`
@@ -926,6 +944,8 @@ where
926
944
| Decl :: TsEnum ( _)
927
945
| Decl :: TsModule ( _)
928
946
| Decl :: Using ( ..) => continue ,
947
+ #[ cfg( swc_ast_unknown) ]
948
+ _ => panic ! ( "unable to access unknown nodes" ) ,
929
949
} ;
930
950
931
951
tracing:: trace!(
@@ -1023,6 +1043,8 @@ where
1023
1043
"module string names unimplemented"
1024
1044
)
1025
1045
}
1046
+ #[ cfg( swc_ast_unknown) ]
1047
+ _ => panic ! ( "unable to access unknown nodes" ) ,
1026
1048
} ;
1027
1049
}
1028
1050
ExportSpecifier :: Default ( s) => {
@@ -1069,6 +1091,8 @@ where
1069
1091
definite : Default :: default ( ) ,
1070
1092
} ) ;
1071
1093
}
1094
+ #[ cfg( swc_ast_unknown) ]
1095
+ _ => panic ! ( "unable to access unknown nodes" ) ,
1072
1096
}
1073
1097
}
1074
1098
@@ -1101,6 +1125,8 @@ where
1101
1125
ModuleExportName :: Str ( ..) => {
1102
1126
unimplemented ! ( "module string names unimplemented" )
1103
1127
}
1128
+ #[ cfg( swc_ast_unknown) ]
1129
+ _ => panic ! ( "unable to access unknown nodes" ) ,
1104
1130
} ;
1105
1131
let orig_ident = match orig {
1106
1132
ModuleExportName :: Ident ( ident) => ident,
@@ -1202,6 +1228,8 @@ where
1202
1228
ModuleExportName :: Str ( ..) => {
1203
1229
unimplemented ! ( "module string names unimplemented" )
1204
1230
}
1231
+ #[ cfg( swc_ast_unknown) ]
1232
+ _ => panic ! ( "unable to access unknown nodes" ) ,
1205
1233
}
1206
1234
}
1207
1235
}
@@ -1262,6 +1290,8 @@ where
1262
1290
ModuleExportName :: Str ( ..) => {
1263
1291
unimplemented ! ( "module string names unimplemented" )
1264
1292
}
1293
+ #[ cfg( swc_ast_unknown) ]
1294
+ _ => panic ! ( "unable to access unknown nodes" ) ,
1265
1295
} ;
1266
1296
vars. push ( (
1267
1297
module_id,
@@ -1317,6 +1347,8 @@ where
1317
1347
continue ;
1318
1348
}
1319
1349
}
1350
+ #[ cfg( swc_ast_unknown) ]
1351
+ _ => panic ! ( "unable to access unknown nodes" ) ,
1320
1352
}
1321
1353
}
1322
1354
0 commit comments