diff options
| author | Basil L. Contovounesios | 2023-06-13 13:45:08 +0100 |
|---|---|---|
| committer | Basil L. Contovounesios | 2023-06-13 14:35:14 +0100 |
| commit | 8dc08333eeaa5938227512cb14fa288f4d6823b6 (patch) | |
| tree | 161c26c611dacc9cf9d1ffb138a367e3d357d0a3 /test/src | |
| parent | 8225ade6151a2d3564b8f68fc8157731c3a1b60f (diff) | |
| download | emacs-8dc08333eeaa5938227512cb14fa288f4d6823b6.tar.gz emacs-8dc08333eeaa5938227512cb14fa288f4d6823b6.zip | |
Fix bol/bos anchors in tree-sitter :match regexps
Further regexp fixes to follow separately (bug#64019#29).
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings):
* lisp/progmodes/cmake-ts-mode.el
(cmake-ts-mode--font-lock-settings):
* lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings):
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
* lisp/progmodes/python.el (python--treesit-settings):
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings):
* lisp/progmodes/sh-script.el (sh-mode--treesit-settings):
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings):
* test/src/treesit-tests.el (treesit-query-api): Anchor :match
regexps at beginning/end of string, not line.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/treesit-tests.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el index fef603840f9..69db37fc0b4 100644 --- a/test/src/treesit-tests.el +++ b/test/src/treesit-tests.el | |||
| @@ -368,14 +368,14 @@ BODY is the test body." | |||
| 368 | ;; String query. | 368 | ;; String query. |
| 369 | '("(string) @string | 369 | '("(string) @string |
| 370 | (pair key: (_) @keyword) | 370 | (pair key: (_) @keyword) |
| 371 | ((_) @bob (#match \"^B.b$\" @bob)) | 371 | ((_) @bob (#match \"\\\\`B.b\\\\'\" @bob)) |
| 372 | (number) @number | 372 | (number) @number |
| 373 | ((number) @n3 (#equal \"3\" @n3)) | 373 | ((number) @n3 (#equal \"3\" @n3)) |
| 374 | ((number) @n3p (#pred treesit--ert-pred-last-sibling @n3p))" | 374 | ((number) @n3p (#pred treesit--ert-pred-last-sibling @n3p))" |
| 375 | ;; Sexp query. | 375 | ;; Sexp query. |
| 376 | ((string) @string | 376 | ((string) @string |
| 377 | (pair key: (_) @keyword) | 377 | (pair key: (_) @keyword) |
| 378 | ((_) @bob (:match "^B.b$" @bob)) | 378 | ((_) @bob (:match "\\`B.b\\'" @bob)) |
| 379 | (number) @number | 379 | (number) @number |
| 380 | ((number) @n3 (:equal "3" @n3)) | 380 | ((number) @n3 (:equal "3" @n3)) |
| 381 | ((number) @n3p (:pred treesit--ert-pred-last-sibling | 381 | ((number) @n3p (:pred treesit--ert-pred-last-sibling |