@@ -184,6 +184,7 @@ pub enum AstNodes<'a> {
184184 TSClassImplements ( & ' a AstNode < ' a , TSClassImplements < ' a > > ) ,
185185 TSInterfaceDeclaration ( & ' a AstNode < ' a , TSInterfaceDeclaration < ' a > > ) ,
186186 TSPropertySignature ( & ' a AstNode < ' a , TSPropertySignature < ' a > > ) ,
187+ TSIndexSignature ( & ' a AstNode < ' a , TSIndexSignature < ' a > > ) ,
187188 TSCallSignatureDeclaration ( & ' a AstNode < ' a , TSCallSignatureDeclaration < ' a > > ) ,
188189 TSMethodSignature ( & ' a AstNode < ' a , TSMethodSignature < ' a > > ) ,
189190 TSConstructSignatureDeclaration ( & ' a AstNode < ' a , TSConstructSignatureDeclaration < ' a > > ) ,
@@ -2469,6 +2470,7 @@ impl<'a> AstNodes<'a> {
24692470 Self :: TSClassImplements ( n) => n. span ( ) ,
24702471 Self :: TSInterfaceDeclaration ( n) => n. span ( ) ,
24712472 Self :: TSPropertySignature ( n) => n. span ( ) ,
2473+ Self :: TSIndexSignature ( n) => n. span ( ) ,
24722474 Self :: TSCallSignatureDeclaration ( n) => n. span ( ) ,
24732475 Self :: TSMethodSignature ( n) => n. span ( ) ,
24742476 Self :: TSConstructSignatureDeclaration ( n) => n. span ( ) ,
@@ -2660,6 +2662,7 @@ impl<'a> AstNodes<'a> {
26602662 Self :: TSClassImplements ( n) => n. parent ,
26612663 Self :: TSInterfaceDeclaration ( n) => n. parent ,
26622664 Self :: TSPropertySignature ( n) => n. parent ,
2665+ Self :: TSIndexSignature ( n) => n. parent ,
26632666 Self :: TSCallSignatureDeclaration ( n) => n. parent ,
26642667 Self :: TSMethodSignature ( n) => n. parent ,
26652668 Self :: TSConstructSignatureDeclaration ( n) => n. parent ,
@@ -2851,6 +2854,7 @@ impl<'a> AstNodes<'a> {
28512854 Self :: TSClassImplements ( n) => SiblingNode :: from ( n. inner ) ,
28522855 Self :: TSInterfaceDeclaration ( n) => SiblingNode :: from ( n. inner ) ,
28532856 Self :: TSPropertySignature ( n) => SiblingNode :: from ( n. inner ) ,
2857+ Self :: TSIndexSignature ( n) => SiblingNode :: from ( n. inner ) ,
28542858 Self :: TSCallSignatureDeclaration ( n) => SiblingNode :: from ( n. inner ) ,
28552859 Self :: TSMethodSignature ( n) => SiblingNode :: from ( n. inner ) ,
28562860 Self :: TSConstructSignatureDeclaration ( n) => SiblingNode :: from ( n. inner ) ,
@@ -3042,6 +3046,7 @@ impl<'a> AstNodes<'a> {
30423046 Self :: TSClassImplements ( _) => "TSClassImplements" ,
30433047 Self :: TSInterfaceDeclaration ( _) => "TSInterfaceDeclaration" ,
30443048 Self :: TSPropertySignature ( _) => "TSPropertySignature" ,
3049+ Self :: TSIndexSignature ( _) => "TSIndexSignature" ,
30453050 Self :: TSCallSignatureDeclaration ( _) => "TSCallSignatureDeclaration" ,
30463051 Self :: TSMethodSignature ( _) => "TSMethodSignature" ,
30473052 Self :: TSConstructSignatureDeclaration ( _) => "TSConstructSignatureDeclaration" ,
@@ -6787,9 +6792,12 @@ impl<'a> AstNode<'a, ClassElement<'a>> {
67876792 } ) )
67886793 }
67896794 ClassElement :: TSIndexSignature ( s) => {
6790- panic ! (
6791- "No kind for current enum variant yet, please see `tasks/ast_tools/src/generators/ast_kind.rs`"
6792- )
6795+ AstNodes :: TSIndexSignature ( self . allocator . alloc ( AstNode {
6796+ inner : s. as_ref ( ) ,
6797+ parent,
6798+ allocator : self . allocator ,
6799+ following_node : self . following_node ,
6800+ } ) )
67936801 }
67946802 } ;
67956803 self . allocator . alloc ( node)
@@ -9930,9 +9938,12 @@ impl<'a> AstNode<'a, TSSignature<'a>> {
99309938 let parent = self . parent ;
99319939 let node = match self . inner {
99329940 TSSignature :: TSIndexSignature ( s) => {
9933- panic ! (
9934- "No kind for current enum variant yet, please see `tasks/ast_tools/src/generators/ast_kind.rs`"
9935- )
9941+ AstNodes :: TSIndexSignature ( self . allocator . alloc ( AstNode {
9942+ inner : s. as_ref ( ) ,
9943+ parent,
9944+ allocator : self . allocator ,
9945+ following_node : self . following_node ,
9946+ } ) )
99369947 }
99379948 TSSignature :: TSPropertySignature ( s) => {
99389949 AstNodes :: TSPropertySignature ( self . allocator . alloc ( AstNode {
@@ -9990,7 +10001,7 @@ impl<'a> AstNode<'a, TSIndexSignature<'a>> {
999010001 self . allocator . alloc ( AstNode {
999110002 inner : & self . inner . parameters ,
999210003 allocator : self . allocator ,
9993- parent : self . parent ,
10004+ parent : self . allocator . alloc ( AstNodes :: TSIndexSignature ( transmute_self ( self ) ) ) ,
999410005 following_node,
999510006 } )
999610007 }
@@ -10001,7 +10012,7 @@ impl<'a> AstNode<'a, TSIndexSignature<'a>> {
1000110012 self . allocator . alloc ( AstNode {
1000210013 inner : self . inner . type_annotation . as_ref ( ) ,
1000310014 allocator : self . allocator ,
10004- parent : self . parent ,
10015+ parent : self . allocator . alloc ( AstNodes :: TSIndexSignature ( transmute_self ( self ) ) ) ,
1000510016 following_node,
1000610017 } )
1000710018 }
0 commit comments