File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -630,6 +630,9 @@ fn custom_handlers(node: &Node) -> TokenStream {
630
630
} }
631
631
// if its a list, we handle it in the handler for `List`
632
632
} ,
633
+ protobuf:: ObjectType :: ObjectType => {
634
+ tokens. push( TokenProperty :: from( Token :: TypeP ) ) ;
635
+ } ,
633
636
_ => panic!( "Unknown DefineStmt {:#?}" , n. kind( ) ) ,
634
637
}
635
638
} ,
Original file line number Diff line number Diff line change @@ -272,6 +272,19 @@ mod tests {
272
272
273
273
#[ test]
274
274
fn test_create_type ( ) {
275
+ test_get_node_properties (
276
+ "create type type1" ,
277
+ SyntaxKind :: DefineStmt ,
278
+ vec ! [
279
+ TokenProperty :: from( SyntaxKind :: Create ) ,
280
+ TokenProperty :: from( SyntaxKind :: TypeP ) ,
281
+ TokenProperty :: from( "type1" . to_string( ) ) ,
282
+ ] ,
283
+ )
284
+ }
285
+
286
+ #[ test]
287
+ fn test_create_composite_type ( ) {
275
288
test_get_node_properties (
276
289
"create type type1 as (attr1 int4, attr2 bool);" ,
277
290
SyntaxKind :: CompositeTypeStmt ,
You can’t perform that action at this time.
0 commit comments