CTest creates a test target which breaks the build when the parser is
included via FetchContent in a CMake project that uses CTest
(cherry picked from commit 02ff0af69c)
```
In file included from tree_sitter/core/lib/src/lib.c:14:
tree_sitter/core/lib/src/./wasm_store.c:868:94: warning: incompatible pointer types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
error = wasmtime_table_grow(context, &function_table, lexer_definitions_len, &initializer, &table_index);
^~~~~~~~~~~~
/Users/rpatterson/Projects/amel/py-tree-sitter/.direnv/python-3.11/include/wasmtime/table.h:105:31: note: passing argument to parameter 'prev_size' here
uint64_t *prev_size);
^
In file included from tree_sitter/core/lib/src/lib.c:14:
tree_sitter/core/lib/src/./wasm_store.c:969:102: warning: incompatible pointer types passing 'uint32_t *' (aka 'unsigned int *') to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Wincompatible-pointer-types]
error = wasmtime_table_grow(context, &self->function_table, dylink_info->table_size, &initializer, &prev_table_size);
^~~~~~~~~~~~~~~~
/Users/rpatterson/Projects/amel/py-tree-sitter/.direnv/python-3.11/include/wasmtime/table.h:105:31: note: passing argument to parameter 'prev_size' here
uint64_t *prev_size);
^
2 warnings generated.
```
(cherry picked from commit 178c5d93f4)
- Use placeholders for version, description, homepage
- Add option for `TREE_SITTER_REUSE_ALLOCATOR`
- Define `TREE_SITTER_DEBUG` in debug mode
(cherry picked from commit a397b454a3)
This mirrors passing `AMALGAMATED=1` to `make` when using the
`Makefile`. It can be enabled by passing `-DAMALGAMATED=ON` to `cmake`.
(cherry picked from commit 666db18c28)
WASI doesn't support `dup(2)` system call, so we cannot implement the
`print_dot_graph` and `print_dot_graphs` functions with exactly the same
semantics as in other platforms.
Previously, `child_containing_descendant` would return `null` when
called on a node's direct parent. In my opinion, this doesn't make much
sense; it seems like a node would contain itself. This (breaking)
commit changes the function so that it can return direct children.