Commit graph

811 commits

Author SHA1 Message Date
Max Brunsfeld
09b522ece2 Fix another bug in subtree_compare
When subtrees differ, exit loop before pushing children to the stack.
2023-11-30 11:10:33 -08:00
Andrew Hlynskyi
d56b51a11d
Revert "Alt #2454" 2023-11-29 11:20:05 +02:00
Max Brunsfeld
034f0d0280
Merge pull request #1864 from tree-sitter/wasm-language
Add optional WASM feature to the native library, allowing it to run wasm-compiled parsers via wasmtime
2023-11-28 12:08:47 -08:00
Max Brunsfeld
13dd76e444 Return an informative error on failing to construct a WasmStore 2023-11-27 17:48:29 -08:00
Andrew Hlynskyi
0d26309c41
Revert "chore(lib): fix fields naming in QueryPattern to singular" 2023-11-28 02:30:01 +02:00
Max Brunsfeld
5e2456c2f2 Avoid using recursion for ts_subtree_compare
This can lead to stack overflow crashes.
2023-11-27 11:35:33 -08:00
Max Brunsfeld
6fd7a1e44e Return informative error when load_language fails 2023-11-26 12:15:05 -08:00
Max Brunsfeld
e9289d3b30 Fix error when wrong language name is passed to load_language 2023-11-24 20:25:28 -08:00
Max Brunsfeld
b59716600a Add a test that loads multiple languages in a wasm store 2023-11-24 20:03:54 -08:00
Max Brunsfeld
359317f876 Determine sizes of static wasm arrays from subsequent static pointers 2023-11-24 11:32:24 -08:00
Max Brunsfeld
97800e0ec8 Advance wasm store's mem + table offsets when adding a language 2023-11-19 12:26:59 -08:00
Amaan Qureshi
0ff28346be
Merge pull request #2714 from MrPrezident/test_point_range_captures_fix
fix "test_point_range_captures not working"
2023-11-12 21:09:09 -08:00
MrPrezident
3c4957e940 fix "test_point_range_captures not working"
Fix for https://github.com/tree-sitter/py-tree-sitter/issues/105
2023-11-12 20:58:51 -06:00
Max Brunsfeld
098969db08 Fix windows compile errors in wasm.c 2023-11-04 12:26:00 -07:00
Max Brunsfeld
b26eff13e2 Remove code duplication in wasm module instantiation, add stdlib symbols 2023-10-31 15:58:56 -07:00
Max Brunsfeld
0743edd162 Include two more std::string functions in wasm stdlib 2023-10-27 21:54:23 +01:00
Max Brunsfeld
2c0b52eec6 Add a comment about how wasmtime-c-api is linked by cargo 2023-10-27 21:53:31 +01:00
Max Brunsfeld
7715e2477a Use Box::leak when passing wasm engine to C code 2023-10-27 21:32:28 +01:00
Max Brunsfeld
b23ef57259 Update wasmtime headers, use latest wasmtime C APIs 2023-10-27 21:30:13 +01:00
Max Brunsfeld
ae2f60d907 Fix loading of wasm languages with fields but no aliases 2023-10-27 21:29:23 +01:00
Max Brunsfeld
091652721e Use upstream wasmtime 2023-10-27 12:43:16 +01:00
Max Brunsfeld
81a1a1733d Fix C compile warnings in wasm.c 2023-10-27 12:16:05 +01:00
Max Brunsfeld
f4e2f68f14 Merge branch 'master' into wasm-language 2023-10-27 12:11:43 +01:00
Daumantas Kavolis
143ed959c9
Use single if block 2023-10-25 10:47:55 +03:00
Daumantas Kavolis
e265929f90
Fix goto_previous_sibling with padded first children 2023-10-25 10:19:03 +03:00
dstoc
8d0997d5b4 Add towlower to wasm exports
tree-sitter/tree-sitter#1906
2023-09-20 10:41:54 +10:00
Amaan Qureshi
6d4aac723f
feat: add some more commonly used functions to exports.json 2023-09-19 09:29:13 -04:00
Andrew Hlynskyi
46965770fc fix(lib): segmentation fault in ts_node_parse_state 2023-09-12 02:35:22 +03:00
Andrew Hlynskyi
524bf7e2c6
Merge pull request #2607 from ahlinc/fix-zero-deallocs
fix: `dealloc` calls on zero pointers
2023-09-03 09:45:52 +03:00
Andrew Hlynskyi
9cc1daafca chore(ffi): remove enum name prefixes from all C enum values 2023-09-03 07:38:27 +03:00
Andrew Hlynskyi
67a5dbdd93 fix: dealloc calls on zero pointers 2023-09-03 06:53:18 +03:00
Andrew Hlynskyi
5921b36a75
Merge pull request #2603 from ahlinc/query-with-slices
chore(rust): make `Query` predicates state fully immutable
2023-09-03 00:17:22 +03:00
Andrew Hlynskyi
52f7eaff31 chore(rust): make Query extra predicates state fully immutable 2023-09-02 23:12:28 +03:00
Andrew Hlynskyi
055c329a69 chore(lib): fix fields naming in QueryPattern to singular 2023-09-02 21:08:54 +03:00
Amaan Qureshi
ec88699f1c
test(node): update bash test 2023-08-31 18:26:22 -04:00
Amaan Qureshi
09030401d1
fix(node): add _isalpha 2023-08-31 17:58:42 -04:00
Amaan Qureshi
09ac28c77d
feat!: properly handle predicates used on quantified captures 2023-08-31 16:01:36 -04:00
Andrew Hlynskyi
f9117a0221 doc: Add internal links for api.h funcs 2023-08-28 23:09:37 +03:00
Andrew Hlynskyi
756e51867d doc: fix cargo doc warnings 2023-08-28 23:09:37 +03:00
mgunyho
bdc0e44d45 doc: Include README in top-level module documentation 2023-08-28 21:27:41 +03:00
mgunyho
8d894bb050 doc: Add backticks to all internal links 2023-08-28 19:26:38 +03:00
mgunyho
dcfd91fc25 doc: Add internal links to backticked text where applicable 2023-08-28 19:26:37 +03:00
mgunyho
4fabc49066 doc: Fix broken link 2023-08-28 19:26:33 +03:00
Amaan Qureshi
a4ea4737ac fix: do not increment current_included_range_index past included_range_count in __do_advance 2023-08-27 14:16:18 +03:00
Andrew Hlynskyi
fae3c5b5cf fix(lib): improve visibility control for clang 2023-08-25 19:11:19 +03:00
Andrew Hlynskyi
b22e4fe3c9 chore: fix a wasm bash test 2023-08-25 17:36:03 +03:00
Amaan Qureshi
5c7098dd56
fix(query): debug print uses wrong variable 2023-08-22 19:22:31 -04:00
DennySun2100
f4a6134461
GCC pragma causes warning on non-GNU compilers 2023-08-21 11:54:09 -07:00
Andrew Hlynskyi
abd57bc69b chore: simplify script/generate-bindings 2023-08-21 02:56:14 +03:00
Andrew Hlynskyi
4278e03b11 feat: generate Rust bindings during build process
It can be used as:
  > cargo build -p tree-sitter -F bindgen
2023-08-21 02:56:14 +03:00