Function: treesit-query-expand
treesit-query-expand is a function defined in treesit.c.
Signature
(treesit-query-expand QUERY)
Documentation
Expand sexp QUERY to its string form.
A PATTERN in QUERY can be
:anchor
:?
:*
:+
:equal
:eq?
:match
:match?
(TYPE PATTERN...)
[PATTERN...]
FIELD-NAME:
@CAPTURE-NAME
(_)
_
"TYPE"
See Info node (elisp)Pattern Matching for detailed explanation.
Other relevant functions are documented in the treesit group.
Shortdoc
;; treesit
(treesit-query-expand '((identifier) @id "return" @ret))
=> "(identifier) @id \"return\" @ret"
Source Code
// Defined in /usr/src/emacs/src/treesit.c
{
return Fmapconcat (Qtreesit_pattern_expand, query, Vtreesit_str_space);
}