From 3011df4f35e43f9f7690b236c85ab54f210c8b3a Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 15 Jan 2024 01:33:26 -0500 Subject: Bump tree-sitter to latest master (#9317) * query capture names now return `&str`s rather than `String`s * the `#any-of?` predicate is now supported--- book/src/guides/indent.md | 6 +++++- book/src/guides/injection.md | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'book') diff --git a/book/src/guides/indent.md b/book/src/guides/indent.md index a65ac5ac..be140384 100644 --- a/book/src/guides/indent.md +++ b/book/src/guides/indent.md @@ -315,6 +315,10 @@ The first argument (a capture) must/must not be equal to the second argument The first argument (a capture) must/must not match the regex given in the second argument (a string). +- `#any-of?`/`#not-any-of?`: +The first argument (a capture) must/must not be one of the other arguments +(strings). + Additionally, we support some custom predicates for indent queries: - `#not-kind-eq?`: @@ -366,4 +370,4 @@ Everything up to and including the closing brace gets an indent level of 1. Then, on the closing brace, we encounter an outdent with a scope of "all", which means the first line is included, and the indent level is cancelled out on this line. (Note these scopes are the defaults for `@indent` and `@outdent`—they are -written explicitly for demonstration.) \ No newline at end of file +written explicitly for demonstration.) diff --git a/book/src/guides/injection.md b/book/src/guides/injection.md index e842ae30..0a1d2c9a 100644 --- a/book/src/guides/injection.md +++ b/book/src/guides/injection.md @@ -54,4 +54,7 @@ The first argument (a capture) must be equal to the second argument The first argument (a capture) must match the regex given in the second argument (a string). +- `#any-of?` (standard): +The first argument (a capture) must be one of the other arguments (strings). + [upstream-docs]: http://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection -- cgit v1.2.3-70-g09d2