@@ -196,6 +196,7 @@ pub enum AstNodes<'a> {
196196 TSInferType ( & ' a AstNode < ' a , TSInferType < ' a > > ) ,
197197 TSTypeQuery ( & ' a AstNode < ' a , TSTypeQuery < ' a > > ) ,
198198 TSImportType ( & ' a AstNode < ' a , TSImportType < ' a > > ) ,
199+ TSConstructorType ( & ' a AstNode < ' a , TSConstructorType < ' a > > ) ,
199200 TSMappedType ( & ' a AstNode < ' a , TSMappedType < ' a > > ) ,
200201 TSTemplateLiteralType ( & ' a AstNode < ' a , TSTemplateLiteralType < ' a > > ) ,
201202 TSAsExpression ( & ' a AstNode < ' a , TSAsExpression < ' a > > ) ,
@@ -2480,6 +2481,7 @@ impl<'a> AstNodes<'a> {
24802481 Self :: TSInferType ( n) => n. span ( ) ,
24812482 Self :: TSTypeQuery ( n) => n. span ( ) ,
24822483 Self :: TSImportType ( n) => n. span ( ) ,
2484+ Self :: TSConstructorType ( n) => n. span ( ) ,
24832485 Self :: TSMappedType ( n) => n. span ( ) ,
24842486 Self :: TSTemplateLiteralType ( n) => n. span ( ) ,
24852487 Self :: TSAsExpression ( n) => n. span ( ) ,
@@ -2670,6 +2672,7 @@ impl<'a> AstNodes<'a> {
26702672 Self :: TSInferType ( n) => n. parent ,
26712673 Self :: TSTypeQuery ( n) => n. parent ,
26722674 Self :: TSImportType ( n) => n. parent ,
2675+ Self :: TSConstructorType ( n) => n. parent ,
26732676 Self :: TSMappedType ( n) => n. parent ,
26742677 Self :: TSTemplateLiteralType ( n) => n. parent ,
26752678 Self :: TSAsExpression ( n) => n. parent ,
@@ -2860,6 +2863,7 @@ impl<'a> AstNodes<'a> {
28602863 Self :: TSInferType ( n) => SiblingNode :: from ( n. inner ) ,
28612864 Self :: TSTypeQuery ( n) => SiblingNode :: from ( n. inner ) ,
28622865 Self :: TSImportType ( n) => SiblingNode :: from ( n. inner ) ,
2866+ Self :: TSConstructorType ( n) => SiblingNode :: from ( n. inner ) ,
28632867 Self :: TSMappedType ( n) => SiblingNode :: from ( n. inner ) ,
28642868 Self :: TSTemplateLiteralType ( n) => SiblingNode :: from ( n. inner ) ,
28652869 Self :: TSAsExpression ( n) => SiblingNode :: from ( n. inner ) ,
@@ -3050,6 +3054,7 @@ impl<'a> AstNodes<'a> {
30503054 Self :: TSInferType ( _) => "TSInferType" ,
30513055 Self :: TSTypeQuery ( _) => "TSTypeQuery" ,
30523056 Self :: TSImportType ( _) => "TSImportType" ,
3057+ Self :: TSConstructorType ( _) => "TSConstructorType" ,
30533058 Self :: TSMappedType ( _) => "TSMappedType" ,
30543059 Self :: TSTemplateLiteralType ( _) => "TSTemplateLiteralType" ,
30553060 Self :: TSAsExpression ( _) => "TSAsExpression" ,
@@ -8928,9 +8933,12 @@ impl<'a> AstNode<'a, TSType<'a>> {
89288933 } ) )
89298934 }
89308935 TSType :: TSConstructorType ( s) => {
8931- panic ! (
8932- "No kind for current enum variant yet, please see `tasks/ast_tools/src/generators/ast_kind.rs`"
8933- )
8936+ AstNodes :: TSConstructorType ( self . allocator . alloc ( AstNode {
8937+ inner : s. as_ref ( ) ,
8938+ parent,
8939+ allocator : self . allocator ,
8940+ following_node : self . following_node ,
8941+ } ) )
89348942 }
89358943 TSType :: TSFunctionType ( s) => {
89368944 panic ! (
@@ -10753,7 +10761,7 @@ impl<'a> AstNode<'a, TSConstructorType<'a>> {
1075310761 . alloc ( self . inner . type_parameters . as_ref ( ) . map ( |inner| AstNode {
1075410762 inner : inner. as_ref ( ) ,
1075510763 allocator : self . allocator ,
10756- parent : self . parent ,
10764+ parent : self . allocator . alloc ( AstNodes :: TSConstructorType ( transmute_self ( self ) ) ) ,
1075710765 following_node,
1075810766 } ) )
1075910767 . as_ref ( )
@@ -10765,7 +10773,7 @@ impl<'a> AstNode<'a, TSConstructorType<'a>> {
1076510773 self . allocator . alloc ( AstNode {
1076610774 inner : self . inner . params . as_ref ( ) ,
1076710775 allocator : self . allocator ,
10768- parent : self . parent ,
10776+ parent : self . allocator . alloc ( AstNodes :: TSConstructorType ( transmute_self ( self ) ) ) ,
1076910777 following_node,
1077010778 } )
1077110779 }
@@ -10776,7 +10784,7 @@ impl<'a> AstNode<'a, TSConstructorType<'a>> {
1077610784 self . allocator . alloc ( AstNode {
1077710785 inner : self . inner . return_type . as_ref ( ) ,
1077810786 allocator : self . allocator ,
10779- parent : self . parent ,
10787+ parent : self . allocator . alloc ( AstNodes :: TSConstructorType ( transmute_self ( self ) ) ) ,
1078010788 following_node,
1078110789 } )
1078210790 }
0 commit comments