feat(sql): improve @type capture (#8315)

Problem: `@type` currently captures function calls but fails to
capture CTE names.

Solution: Don't capture types in invocations. Add pattern for `cte`.
This commit is contained in:
adaitche
2025-12-09 10:53:37 +01:00
committed by GitHub
parent a98a740c55
commit 02693ce64c

View File

@@ -13,8 +13,12 @@
(keyword_object_id)
] @function.call
(object_reference
name: (identifier) @type)
((object_reference
name: (identifier) @type) @_obj_ref
(#not-has-parent? @_obj_ref invocation))
(cte
(identifier) @type)
(relation
alias: (identifier) @variable)