diff options
| author | Yuan Fu | 2023-09-01 19:47:20 -0700 |
|---|---|---|
| committer | Yuan Fu | 2023-09-01 20:38:32 -0700 |
| commit | 1e91183c399bb6d4cf7ebd1f82df2dbeaaa4ba7b (patch) | |
| tree | 0e40c35ed6ba13514308b93b5c5498c9628b35c8 | |
| parent | 7fc416d90b95c6014c5745a84069844eab1e6e33 (diff) | |
| download | emacs-1e91183c399bb6d4cf7ebd1f82df2dbeaaa4ba7b.tar.gz emacs-1e91183c399bb6d4cf7ebd1f82df2dbeaaa4ba7b.zip | |
; * src/treesit.c (Vtreesit_thing_settings): Update docstring.
| -rw-r--r-- | src/treesit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/treesit.c b/src/treesit.c index ce9d867fb2c..0158d769b99 100644 --- a/src/treesit.c +++ b/src/treesit.c | |||
| @@ -4016,20 +4016,20 @@ LANGUAGE is a language symbol, and DEFINITIONS is a list of | |||
| 4016 | (THING PRED) | 4016 | (THING PRED) |
| 4017 | 4017 | ||
| 4018 | THING is a symbol representing the thing, like `defun', `sexp', or | 4018 | THING is a symbol representing the thing, like `defun', `sexp', or |
| 4019 | `block'; PRED defines what kind of node can be qualified as THING. | 4019 | `sentence'; PRED defines what kind of node can be qualified as THING. |
| 4020 | 4020 | ||
| 4021 | PRED can be a regexp string that matches the type of the node; it can | 4021 | PRED can be a regexp string that matches the type of the node; it can |
| 4022 | be a predicate function that takes the node as the sole argument and | 4022 | be a predicate function that takes the node as the sole argument and |
| 4023 | returns t if the node is the thing; it can be a cons (REGEXP . FN), | 4023 | returns t if the node is the thing, and nil otherwise; it can be a |
| 4024 | which is a combination of a regexp and a predicate function, and the | 4024 | cons (REGEXP . FN), which is a combination of a regexp and a predicate |
| 4025 | node has to match both to qualify as the thing. | 4025 | function, and the node has to match both to qualify as the thing. |
| 4026 | 4026 | ||
| 4027 | PRED can also be recursively defined. It can be (or PRED...), meaning | 4027 | PRED can also be recursively defined. It can be (or PRED...), meaning |
| 4028 | satisfying anyone of the inner PREDs qualifies the node; or (not | 4028 | satisfying anyone of the inner PREDs qualifies the node; or (not |
| 4029 | PRED), meaning not satisfying the inner PRED qualifies the node. | 4029 | PRED), meaning not satisfying the inner PRED qualifies the node. |
| 4030 | 4030 | ||
| 4031 | Finally, PRED can refer to other THINGs defined in this list by using | 4031 | Finally, PRED can refer to other THINGs defined in this list by using |
| 4032 | the symbol of that THING. For example, (or block sexp). */); | 4032 | the symbol of that THING. For example, (or sexp sentence). */); |
| 4033 | Vtreesit_thing_settings = Qnil; | 4033 | Vtreesit_thing_settings = Qnil; |
| 4034 | 4034 | ||
| 4035 | staticpro (&Vtreesit_str_libtree_sitter); | 4035 | staticpro (&Vtreesit_str_libtree_sitter); |