Commit graph

651 commits

Author SHA1 Message Date
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
Max Brunsfeld
da6e24de17 Fix adjustment of trees' included ranges on edits
Previously, when an included range started or ended *inside* of
an edit, that range did not get updated correctly.

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2022-11-07 16:52:19 -08:00
Max Brunsfeld
f0177f216e Use library-configured allocator to free intermediate included ranges 2022-11-07 10:48:32 -08:00
Max Brunsfeld
1848d0bc36 Add tree included ranges getter
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-11-04 15:24:07 -07:00
Logan Collins
5337a678fa Resolving a potential crash freeing a null pointer when cancelling parses. 2022-10-31 11:35:52 -07:00
Matt
98b8226c70
Remove unnecessary cast 2022-09-21 20:17:30 -04:00
Matt
8751fa0853
Add explicit casting for array capacities 2022-09-21 15:52:44 -04:00
Max Brunsfeld
70cfc55e58
Merge pull request #1879 from mattmassicotte/fix/sizes
change integer type in ts_parser__set_cached_token
2022-09-21 10:25:38 -07:00
Matt
af6611e530
matching integer types 2022-09-21 08:50:01 -04:00
Max Brunsfeld
67d13cf50b Fix integer size of subtree's child count field
Fixes tree-sitter/tree-sitter-cpp#175
2022-09-08 11:02:42 -07:00
Max Brunsfeld
2be51abcd8 Bump library versions 2022-09-02 15:00:09 -07:00
Max Brunsfeld
15190a497d Build core wasm library with C++ exceptions disabled 2022-09-02 14:55:50 -07:00
Max Brunsfeld
1b86ccecc8
Merge pull request #1845 from tree-sitter/root-node-with-offset
Add API for applying a positional offset when accessing a tree's nodes
2022-08-25 10:51:20 -07:00
Max Brunsfeld
dccb291e4a
Merge pull request #1849 from NicholasLYang/docs/web-tree-sitter
docs: Added documentation on web-tree-sitter edge cases
2022-08-25 10:27:56 -07:00
Max Brunsfeld
6b87326470
Merge pull request #1787 from kianmeng/fix-typos
Fix typos
2022-08-25 10:25:39 -07:00
Max Brunsfeld
53ed4cf037 Tolerate tree edits whose old range extends beyond the end of the tree 2022-08-25 10:20:40 -07:00
Nicholas Yang
8131e7635e Added documentation on web-tree-sitter edge cases 2022-08-21 17:55:04 -04:00
Max Brunsfeld
477b667753 Add ts_tree_root_node_with_offset API 2022-08-18 13:48:47 -07:00
Sebastian Lackner
1245d54fb8 Fix crash in ts_node_field_name_for_child when no children are present 2022-07-27 12:26:35 +02:00
Sebastian Lackner
2174288e30 query: Use uint16_t for production_id in AnalysisSubgraphNode struct 2022-07-26 21:50:38 +02:00
Max Brunsfeld
79eaa68793 Don't match nested wildcard patterns against error nodes 2022-07-07 18:11:52 -07:00
Max Brunsfeld
254edb0ec8 Include captured summary information in stack debug graphs 2022-07-07 17:53:54 -07:00
Max Brunsfeld
548c12fb88 Fix bug where patterns with top-level alternatives were not considered 'rooted' 2022-07-07 17:53:54 -07:00
Max Brunsfeld
1401767689 query: Don't attempt to match top-level sibling patterns directly in ERROR nodes
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-07-07 15:27:00 -07:00