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 {
630630 } }
631631 // if its a list, we handle it in the handler for `List`
632632 } ,
633+ protobuf:: ObjectType :: ObjectType => {
634+ tokens. push( TokenProperty :: from( Token :: TypeP ) ) ;
635+ } ,
633636 _ => panic!( "Unknown DefineStmt {:#?}" , n. kind( ) ) ,
634637 }
635638 } ,
Original file line number Diff line number Diff line change @@ -272,6 +272,19 @@ mod tests {
272272
273273 #[ test]
274274 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 ( ) {
275288 test_get_node_properties (
276289 "create type type1 as (attr1 int4, attr2 bool);" ,
277290 SyntaxKind :: CompositeTypeStmt ,
You can’t perform that action at this time.
0 commit comments