Commit graph

5271 commits

Author SHA1 Message Date
ObserverOfTime
70fd2c02f1 chore(bindings): update go binding version
(cherry picked from commit 1d5502d7b2)
2024-11-10 05:02:08 +01:00
ObserverOfTime
35f119db03 chore(bindings): include tree-sitter.json file
(cherry picked from commit 2d5a4b6bd6)
2024-11-10 05:02:08 +01:00
Amaan Qureshi
0258a41e15 fix(cli): use contains over is in warning
(cherry picked from commit 7baefa8609)
2024-11-10 04:51:26 +01:00
Amaan Qureshi
32c1466224 fix(generate): do not set the unit reduction symbol if it's in the extras array
(cherry picked from commit 998d2c9d8c)
2024-11-10 04:49:47 +01:00
ObserverOfTime
54299d3d87 chore(bindings): correct editorconfig indent size
(cherry picked from commit 8681960fbc)
2024-11-10 04:47:57 +01:00
ObserverOfTime
8745e5d2ce chore(bindings): drop pkg-config Requires field
(cherry picked from commit c23670264f)
2024-11-10 04:47:57 +01:00
ObserverOfTime
1fd07fd619 chore(bindings): improve gitattributes file
- Separate bindings into language sections
- Mark all metadata & lockfiles as generated

(cherry picked from commit 4089569934)
2024-11-10 04:47:57 +01:00
ObserverOfTime
2303b7d2c5 chore(bindings): clean up package.json
- Use PARSER_URL in repository
- Remove tree-sitter section

(cherry picked from commit 5df4706b19)
2024-11-10 04:47:57 +01:00
Mrmaxmeier
0358feda05 fix: return LanguageRef in Parser::language
`ts_parser_language` doesn't do any refcounting, so we can't return the
resulting pointer as an owned Language object

(cherry picked from commit c03977a87e)
2024-11-10 04:47:41 +01:00
Amaan Qureshi
1aa6567c7b fix(init): use camel name from config in missing spots
(cherry picked from commit 3b55003fd5)
2024-11-10 04:47:06 +01:00
ObserverOfTime
9d0313af0f fix(init): use current path if unspecified
(cherry picked from commit f9a4e8ecdc)
2024-11-10 04:45:39 +01:00
Amaan Qureshi
85a42f48be chore(cli): minor correction in comments
(cherry picked from commit c611e15a31)
2024-11-10 04:43:41 +01:00
Amaan Qureshi
aac741dfd1 perf(loader): improve language lookup speed
(cherry picked from commit 72f114fa12)
2024-11-10 04:42:02 +01:00
Amaan Qureshi
4cf96126d4 fix(lib): correctly fetch the node name in query errors
(cherry picked from commit 49ff53cc83)
2024-11-10 04:35:58 +01:00
Bastiaan Marinus van de Weerd
61d67adbf7 feat(loader): add language_for_configuration
(cherry picked from commit 0dc1044d0d)
2024-11-09 21:12:32 +01:00
ObserverOfTime
5e93499f20 chore(bindings): more small changes
- Rename cmakelists.txt to cmakelists.cmake
- Bump node-addon-api version in package.json
- Remove License classifier from pyproject.toml
- Move require call to top level in Node.js test

(cherry picked from commit d3a127a48f)
2024-11-03 17:17:38 +02:00
ObserverOfTime
b1493f9b35 fix(bindings): update CMakeLists.txt file
(cherry picked from commit 66a1bc50fa)
2024-11-03 12:25:06 +02:00
ObserverOfTime
89bd9e302e build(bindings): rename cmake test target
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)
2024-11-02 14:14:41 -04:00
Sam Estep
12bc174205 fix(cli): pass all fields to tree-sitter.json in init
(cherry picked from commit f3f7230ee3)
2024-10-31 15:43:56 +01:00
Amaan Qureshi
a498790a82 fix(lib): simplify edge cases with zero-width tokens
(cherry picked from commit 350fff24bf)
2024-10-28 17:24:53 +01:00
ObserverOfTime
f629fd4aed revert: "Memory errors in wasm_store"
This reverts commit 178c5d93f4.

(cherry picked from commit b7421bf89f)
2024-10-13 17:26:22 +03:00
Ryan Patterson
657c7b548e Memory errors in wasm_store
```
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)
2024-10-13 14:53:01 +02:00
Amaan Qureshi
bdfe32402e
0.24.3 2024-10-09 17:23:15 -04:00
Christian Clason
8c45b79808 build(deps): bump wasmtime to v25.0.2
(cherry picked from commit b7a00527be)
2024-10-09 19:49:48 +02:00
Amaan Qureshi
cd1abd9351 fix(lib): correct unexpected side effect in get_column when the lexer is at EOF
(cherry picked from commit 538a197976)
2024-10-09 10:27:04 +02:00
dundargoc
46bdc14e20 build: fix incorrect variable checks
Cmake variables should not use `${}` when checking for existence.

(cherry picked from commit 94f7a47abd)
2024-10-06 13:27:08 -04:00
Amaan Qureshi
0b167b0782
0.24.2 2024-10-05 20:18:35 -04:00
Carlo Cabrera
76fffb0f2d build(make): fix tree-sitter.pc generation (#3745)
(cherry picked from commit 079c69313f)
2024-10-05 20:16:31 -04:00
ObserverOfTime
b759a5fac5 fix(templates): properly replace author email
(cherry picked from commit 21a34f9124)
2024-10-05 20:16:20 -04:00
ObserverOfTime
b3f808cc01 chore(templates): update npm packages
(cherry picked from commit 95f24e0364)
2024-10-05 20:16:20 -04:00
ObserverOfTime
0d8f143a9d build(bindings): improve cmake file
- 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)
2024-10-05 20:15:19 -04:00
ObserverOfTime
c639d547f9 feat: drop legacy binding updates
(cherry picked from commit 1d76ec3a1c)
2024-10-05 20:15:08 -04:00
ObserverOfTime
75d2915f48 build(cmake): correct library scopes
(cherry picked from commit edfd47e1c6)
2024-10-05 20:15:00 -04:00
Carlo Cabrera
c21db9fea9 build(cmake): support amalgamated build
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)
2024-10-05 20:13:58 -04:00
Amaan Qureshi
693a403acd 0.24.1 2024-10-04 00:47:45 -04:00
Amaan Qureshi
2047b22ae5
fix(generate): move generated header files into the generate crate 2024-10-04 00:47:30 -04:00
Amaan Qureshi
dfc891a5ce
0.24.0 2024-10-04 00:16:20 -04:00
Amaan Qureshi
6769386a33 build: bump language to 0.1.1 2024-10-04 00:11:26 -04:00
Amaan Qureshi
cd81527b1b build(xtask): ignore the language crate 2024-10-04 00:11:26 -04:00
Amaan Qureshi
c801594b85 build(xtask): only consider major and minor versions when validating the current version 2024-10-04 00:11:26 -04:00
Amaan Qureshi
f8f08210fc build(xtask): bump cmake version in bump-version 2024-10-04 00:11:26 -04:00
Amaan Qureshi
671a075fd6 fix(build): force rebuild parsers when build is invoked 2024-10-03 22:00:13 -04:00
Amaan Qureshi
91df16bdc8 fix(lib): ensure an unfinished state was found before removing it 2024-10-03 21:33:36 -04:00
ObserverOfTime
6f08a684aa build(cmake): link wasmtime dependencies 2024-10-03 19:32:22 -04:00
Amaan Qureshi
49bda0e2c5 fix(generate): filter out unused rules in other spots 2024-10-03 19:32:09 -04:00
Sergio A. Vargas
e4dec3d3d8
fix(generate): add *.scm section to .editorconfig template 2024-10-03 16:41:47 -04:00
Amaan Qureshi
99a0ddc4c2 fix(generate): remove unused rules 2024-10-03 16:40:51 -04:00
Amaan Qureshi
19c33b1ef7 fix(build): correct wasm root path lookup 2024-10-03 16:23:55 -04:00
Amaan Qureshi
8500e331eb fix(init): do not migrate package.json on error 2024-10-02 16:25:29 -04:00
ObserverOfTime
c3d45a0153 fix(init): don't prompt to reconfigure
This allows the command to be used in scripts or CI
2024-10-01 11:37:57 -04:00