Commit graph

674 commits

Author SHA1 Message Date
Amaan Qureshi
1982e48568 chore: update exports to include some string.h functions 2023-07-10 15:21:39 -04:00
Max Brunsfeld
d0029a1527 Avoid unused value warning from array_pop 2023-06-14 11:31:43 -07:00
Max Brunsfeld
4922602369
Merge pull request #2316 from tree-sitter/node-descendant-index
Add APIs for retrieving descendant counts, seeking to nodes by their descendant index
2023-06-12 15:13:43 -07:00
Max Brunsfeld
3375527a89 Fix bug in ts_tree_cursor_goto_descendant 2023-06-12 14:45:30 -07:00
Max Brunsfeld
a2119cb691 Add APIs for retrieving tree cursor's depth and descendant index 2023-06-12 11:50:44 -07:00
Max Brunsfeld
9dd725b4e3 Start work on exposing APIs for node descendant counts and indices 2023-06-09 08:51:47 -07:00
Samuel Moelius
f461d953a6 Fix OOB in Query::new 2023-05-19 21:31:26 -04:00
Philipp Mildenberger
55a8db10cc fix: bug with first child group anchor (anchor had no effect) 2023-05-13 19:40:49 +03:00
Andrew Hlynskyi
63d9f7146f Fix get_column() segfault on EOF, don't do lookahead without EOF check first 2023-04-22 12:11:26 +03:00
Andrew Hlynskyi
4f4b86a40b lib: make query step init depend from MAX_STEP_CAPTURE_COUNT decl 2023-04-19 09:37:46 +03:00
Andrew Hlynskyi
cc6596be82 chore(bindgen): update bindgen to 0.65.1 and regenerate bindings 2023-04-17 11:24:05 +03:00
Andrew Hlynskyi
d4d5e29c91 feat(lib): ts_query_cursor_set_max_start_depth - use 0 to reset 2023-04-17 11:16:04 +03:00
Lewis Russell
1e81a1b67f feat(lib): add ts_query_cursor_set_max_start_depth query API
This allows configuring cursors from traversing too deep into a tree.
2023-04-17 11:15:13 +03:00
Andrew Hlynskyi
613382c70a docs: update badges; fix markdown lint complains
Linter config `.vscode/settings.json`:
```json
{
    "[markdown]": {
        "files.trimTrailingWhitespace": false,
    },
    "markdownlint.config": {
        "default": true,
        // "ul-style": {
        //     "style": "asterisk"
        // },
        "MD001": false,
        "MD024": false,
        "MD025": false,
        "MD033": false,
        "MD041": false,
        "MD053": false,
    },
}
```
2023-04-16 23:39:08 +03:00
Andrew Hlynskyi
90fca305bf Merge branch 'recover-web-v0.20.8' into master 2023-04-10 20:32:59 +03:00
Andrew Hlynskyi
de906378ab web: 0.20.8 2023-04-10 19:50:32 +03:00
Andrew Hlynskyi
1f051d339c chore(docs): fix misprint repetitions and remove dangling spaces 2023-04-09 20:40:18 +03:00
Andrew Hlynskyi
4c2a36302b lib: fix OOB in query engine reported in #2162 2023-04-06 03:59:55 +03:00
Andrew Hlynskyi
c38f78345e binding(rust): update script/generate-bindings to use latest rust-bindgen 0.64.0 version 2023-04-04 22:16:27 +03:00
Matt
65c16bfb17 query casts 2023-04-04 17:43:27 +03:00
Matt
cde45268b6 subtree casts 2023-04-04 17:43:27 +03:00
Andrew Hlynskyi
0261a13984 lib: fix ts_node_field_name_for_child implementation
With hidden subtrees correct incorporation and field inheritance support.
2023-04-04 16:54:32 +03:00
Andrew Hlynskyi
d56506b727 ref(rust_bindings): keep Query construction logic in a one place 2023-04-04 15:08:53 +03:00
Vhyrro
e5357dc5ad ref(rust_bindings): add from_raw() functions 2023-04-04 15:08:53 +03:00
Vhyrro
6c2957c8d3 ref(rust_bindings): move into_raw() functions into the ffi module 2023-04-04 15:08:53 +03:00
Vhyrro
576e4c7d06 fix(rust_bindings): use-after-free for Language::into_raw() 2023-04-04 15:08:53 +03:00
Vhyrro
3d396e120b feat(rust_bindings): provide into_raw() functions for treesitter structs 2023-04-04 15:08:53 +03:00
Andrew Hlynskyi
da894afef5 cargo: specify minimum supported Rust version 2023-04-04 03:42:55 +03:00
Andrew Hlynskyi
ec2af46f6f chore: remove all dead badges 2023-03-16 18:00:02 +02:00
Andrew Hlynskyi
47c1e858ef Update deps: lib/binding_web/package.json 2023-03-14 20:37:12 +02:00
Max Brunsfeld
811bc8256d lib: 0.20.10 2023-03-13 12:21:19 -07:00
Max Brunsfeld
837899e456 Add API for checking if a pattern in a query is non-local 2023-02-16 11:59:34 -08:00
Max Brunsfeld
40703f110c Fix bug in maintenance of query cursor's tree depth 2023-02-16 11:59:34 -08:00
Max Brunsfeld
bd63fb2a0d Tweak query tests 2023-02-16 11:59:34 -08:00
Max Brunsfeld
fa869cf3ed Restructure query_cursor_advance to explicitly control which hidden nodes it descends into 2023-02-16 11:59:34 -08:00
Max Brunsfeld
29c9073177 Extract 'internal' versions of tree cursor movement fns that allow visiting hidden nodes 2023-02-16 11:59:34 -08:00
Max Brunsfeld
189cf6d59d Group analysis state sets into QueryAnalysis struct 2023-02-16 11:59:34 -08:00
Max Brunsfeld
32ce1fccd0 Precompute the set of repetition symbols that can match rootless patterns 2023-02-16 11:59:34 -08:00
Max Brunsfeld
450c67484b For now, don't implement ts_tree_print_dot_graph on windows 2023-02-13 23:18:41 -08:00
Max Brunsfeld
0b817a609f Clear the parse stack when terminating parsing early due to error cost
This fixes a bug where the parse tree would not be rebalanced if this
code path was taken.
2023-02-13 13:45:12 -08:00
Max Brunsfeld
97fd990822 Add --dot flag to parse subcommand, for printing tree as DOT graph 2023-02-13 12:33:34 -08:00
Léo Gaspard
3964651fc6
Derive Hash for Language
Given Language implements Eq, it can probably implement Hash too.

This makes it easy to derive a random identifier from a `Language`
2023-02-09 03:35:42 +01:00
Max Brunsfeld
e021d6e979
Merge pull request #1990 from DeepChannel/fix/nanos-rollover
fix: possible rollover of nanoseconds in clock.h
2023-02-01 13:15:32 -08:00
Andrew Hlynskyi
19bd5868eb Fix wasm tests 2023-01-06 08:32:26 +02:00
Phil Freeman
eb549a89ad fix: possible rollover of nanoseconds in clock.h 2022-12-14 09:43:58 -08:00
Jonathan Arnett
e4fc6653ee Add __cxa_atexit to exports 2022-11-15 16:39:17 -08:00
Jonathan Arnett
56e9753b5f Add memset to exports 2022-11-15 16:39:17 -08:00
Max Brunsfeld
efd22e452b Fix suppression of empty tokens during error handling at included range boundaries 2022-11-14 12:20:39 -08:00
Max Brunsfeld
d07f864815 Fix parse error when reusing a node at the end of an included range 2022-11-11 16:34:57 -08:00
Max Brunsfeld
618146260e Add doc comments for tree included ranges getter 2022-11-08 17:47:57 -08:00