File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
crates/postgresql-cst-parser/src/tree_sitter Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,8 @@ fn walk_and_build(
154154 | SyntaxKind :: set_target_list
155155 | SyntaxKind :: insert_column_list
156156 | SyntaxKind :: index_params
157- | SyntaxKind :: values_clause) => {
157+ | SyntaxKind :: values_clause
158+ | SyntaxKind :: TableFuncElementList ) => {
158159 if parent_kind == child_kind {
159160 // [Node: Flatten]
160161 //
@@ -495,5 +496,14 @@ FROM
495496
496497 assert_no_direct_nested_kind ( & new_root, SyntaxKind :: values_clause) ;
497498 }
499+
500+ #[ test]
501+ fn no_nested_table_func_element_list ( ) {
502+ let input = "select * from unnest(a) as (x int, y text);" ;
503+ let root = cst:: parse ( input) . unwrap ( ) ;
504+ let ( new_root, _) = get_ts_tree_and_range_map ( input, & root) ;
505+
506+ assert_no_direct_nested_kind ( & new_root, SyntaxKind :: TableFuncElementList ) ;
507+ }
498508 }
499509}
You can’t perform that action at this time.
0 commit comments