fmt: add support for comments inside sql db { ... } blocks (fix #22601) (#22602)

This commit is contained in:
Felipe Pena 2024-10-21 06:08:04 -03:00 committed by GitHub
parent 9579c1f68b
commit cf03ecd0de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 38 additions and 0 deletions

View file

@ -1824,6 +1824,8 @@ fn (t Tree) sql_stmt_line(node ast.SqlStmtLine) &Node {
obj.add_terse('updated_columns', t.array_node_string(node.updated_columns))
obj.add_terse('update_exprs', t.array_node_expr(node.update_exprs))
obj.add('pos', t.pos(node.pos))
obj.add('pre_comments', t.array_node_comment(node.pre_comments))
obj.add('end_comments', t.array_node_comment(node.end_comments))
sub_struct_map := new_object()
for key, val in node.sub_structs {