Function: combobulate-query-builder-capture-group-fn

combobulate-query-builder-capture-group-fn is a natively compiled function defined in combobulate-query.el.

Signature

(combobulate-query-builder-capture-group-fn CAPTURE-GROUP-NAME MATCH-TEXT MATCH-DEPTH)

Documentation

Build a query for a capture group named CAPTURE-GROUP-NAME matching MATCH-TEXT.

Note that CAPTURE-GROUP-NAME must begin with a @, as per the rules of Tree-sitter's query language.

MATCH-DEPTH should be the depth at which the matcher is installed, relative to the number of parent nodes, usually 0 or 1.

If STRING-STYLE is non-nil, use @match instead of :match.

Source Code

;; Defined in /nix/store/b5fvrwzi3zvkabyzx0in6gw1cj963z46-emacs-packages-deps/share/emacs/site-lisp/combobulate-query.el
(defun combobulate-query-builder-capture-group-fn (capture-group-name match-text match-depth)
  "Build a query for a capture group named CAPTURE-GROUP-NAME matching MATCH-TEXT.

Note that CAPTURE-GROUP-NAME must begin with a `@', as per the
rules of Tree-sitter's query language.

MATCH-DEPTH should be the depth at which the matcher is
installed, relative to the number of parent nodes, usually 0 or 1.

If STRING-STYLE is non-nil, use `@match' instead of `:match'."
  (lambda (_node _rest-nodes before ct)
    (when (and (not before) (= ct match-depth))
      ;; build the query here. we want the matcher
      ;; placed after the match-node (hence `(not
      ;; before)')
      (combobulate-query-builder-match-form capture-group-name match-text))))