]> git.eshelyaron.com Git - emacs.git/commit
Correct conversion of strings to tree-sitter query syntax
authorMattias Engdegård <mattiase@acm.org>
Fri, 16 Jun 2023 10:37:07 +0000 (12:37 +0200)
committerMattias Engdegård <mattiase@acm.org>
Fri, 16 Jun 2023 10:58:57 +0000 (12:58 +0200)
commit8657afac774f36777d0fdd368e0bec64beca22ae
treebe7d0013e0a0732b2849c14f920d8c98a2fafb58
parentf2aae8b879baa4986b69af7ee54fe4eb987b99d6
Correct conversion of strings to tree-sitter query syntax

The treesitter query syntax for string literals differs from that of
Elisp so we cannot just use the Lisp printer (bug#64017).

* src/treesit.c (treesit_query_string_string): New function.
(Ftreesit_pattern_expand): Use it.
* test/src/treesit-tests.el (treesit-query-api): Add test case.
src/treesit.c
test/src/treesit-tests.el