Amaan Qureshi
f1eecf9786
feat: expose the allocator and array header files for external scanners
2024-02-26 09:43:13 -05:00
Amaan Qureshi
62578b8c6e
feat(loader): add more commonly used default parser directories
2024-02-21 12:01:25 -05:00
Amaan Qureshi
b40839cd72
style: prefer turbofish syntax where possible
2024-02-19 16:00:50 -05:00
Amaan Qureshi
fd91404ab0
style: tidying
2024-02-19 16:00:50 -05:00
Amaan Qureshi
03c5a8540d
feat: better error info when a scanner is missing required symbols
2024-02-17 00:45:28 -05:00
Amaan Qureshi
6c0643f295
fix: always push the default files if there's no externals
2024-02-16 22:42:40 -05:00
Amaan Qureshi
e32a7f3998
chore: clippy lints
2024-02-16 16:32:07 -05:00
Amaan Qureshi
4342efd57e
feat: allow specifying an external scanner's files
2024-02-16 16:31:56 -05:00
Amaan Qureshi
e996c32108
refactor!: remove the apply-all-captures flag, make last-wins precedence the default
2024-02-16 12:34:12 -05:00
Amaan Qureshi
74812ced1b
chore: deprecate C++ scanners
...
C++ has been a headache to deal with throughout the ecosystem and for
several downstream projects. It is difficult to get working with WASM,
and induces potential issues with compilation on Windows. It has been
proven that writing scanners in C is a much better alternative, and is
the recommended way to write scanners now. C++ support will likely be
removed in 0.21.0
2024-02-14 15:43:53 -05:00
Amaan Qureshi
d989b26587
chore: print out full compiler arguments ran when it fails
2024-02-14 13:19:06 -05:00
Amaan Qureshi
a07f988905
refactor: extract regex check into a function and lower its precedence
2024-02-13 03:33:07 -05:00
Bedis Nbiba
7dd096c5f7
feat: implement first-line-regex
2024-02-13 01:51:41 -05:00
Amaan Qureshi
48deb309db
chore(cli): warn users when a query path needed for a subcommand isn't specified in a grammar's package.json
2024-02-12 17:17:37 -05:00
Amaan Qureshi
7233c2f26f
feat: use lockfiles to dedup recompilation
2024-02-12 06:30:36 -05:00
Amaan Qureshi
e6d67ecde0
chore(wasm): use SIDE_MODULE=2 to silence warning
2024-02-11 20:18:30 -05:00
Amaan Qureshi
e4894ac8b4
chore(cli): use spawn to display emcc's stdout and stderr
...
Co-authored-by: Nbiba Bedis <bedisnbiba@gmail.com>
2024-02-09 14:17:34 +01:00
dundargoc
c8bd6705cf
chore: clippy
2024-02-06 23:34:14 -05:00
Amaan Qureshi
04ff704bca
chore(cli): apply clippy fixes
2024-02-04 04:18:48 -05:00
Amaan Qureshi
1fb16a72ac
chore(loader): apply clippy fixes
2024-02-03 19:38:37 -05:00
Amaan Qureshi
9f2dc9d6b5
fix: rework parser.h includes for test grammars and multi-grammar repos
2024-02-02 10:42:39 -05:00
Max Brunsfeld
1d8975319c
Merge pull request #2840 from tree-sitter/language-reference-count
...
Introduce APIs for managing the lifetimes of languages, allow WASM languages to be deleted
2024-01-30 10:24:37 -08:00
Steven Kalt
d35efd4608
feat(cli): support building WASM via podman
...
Previously, `tree-sitter build-wasm` had the ability to build WASM
by using docker to pull in an image with a complete emscripten toolchain.
This commit adds the ability to use podman to do the same thing.
Using podman requires two notable changes:
1. Using the fully-qualified image name. Docker defaults to prepending
`docker.io` to the image name, but podman does not.
2. Podman will mount the `/src/` volume as belonging to root unless
`--userns=keep-id` is passed. I think podman's different
volume-ownership is related to podman's daemonless execution and
`--uidmap` functionality, but I'm not 100% sure.
To test, I ran
```sh
script/fetch-fixtures
script/generate-fixtures
script/generate-fixtures-wasm # <- the important one!
```
which worked as well as the docker version.
2024-01-29 00:50:32 -05:00
Max Brunsfeld
da16cb1459
Introduce language ref-count management C APIs, remove Copy impl for Language in Rust
2023-12-27 14:59:16 -08:00
Max Brunsfeld
13dd76e444
Return an informative error on failing to construct a WasmStore
2023-11-27 17:48:29 -08:00
Max Brunsfeld
6fd7a1e44e
Return informative error when load_language fails
2023-11-26 12:15:05 -08:00
Max Brunsfeld
473b3c8208
Add a CLI feature flag for wasm runtime support
2023-10-31 16:56:11 -07:00
Max Brunsfeld
f4e2f68f14
Merge branch 'master' into wasm-language
2023-10-27 12:11:43 +01:00
Amaan Qureshi
cc66895343
perf: cache the current language configuration to lookup later on
2023-09-21 00:52:50 -04:00
Andrew Hlynskyi
52f7eaff31
chore(rust): make Query extra predicates state fully immutable
2023-09-02 23:12:28 +03:00
Amaan Qureshi
dc5ec1cf53
refactor: remove &Option<T> where used
2023-09-01 17:23:39 -04:00
Andrew Hlynskyi
0862921537
doc: Include README as top-level module documentation for all crates
2023-08-28 23:09:37 +03:00
Amaan Qureshi
45313e0dfb
feat: add injection.self to inject a node with itself
2023-08-18 18:37:57 -04:00
Amaan Qureshi
ce4a9ef4de
feat: allow specifying an input query-paths argument
2023-08-17 22:21:20 -04:00
Amaan Qureshi
8eb92d1c64
feat: add an --apply-all-captures argument to highlight & test
2023-08-17 22:20:57 -04:00
Amaan Qureshi
ece1060d2c
feat: warn users when using non-static functions that aren't needed for tree-sitter
2023-08-16 01:59:03 -04:00
Amaan Qureshi
137483c7b9
fix: take the last range element by default if the query error isn't found
2023-07-27 12:34:47 -04:00
Amaan Qureshi
cf418a286e
chore: make implicit function declarations a compile-time error
2023-07-20 06:52:50 -04:00
Amin Yahyaabadi
04453f64af
fix: remove redundant get_compiler() call
2023-07-11 10:57:34 -07:00
Amin Yahyaabadi
5d83c8f3b8
fix: do not use -fPIC on Windows
2023-07-11 10:57:34 -07:00
Amin Yahyaabadi
76c5773d7c
fix: fix detection of the compiler on windows
2023-07-11 10:57:34 -07:00
Andrew Hlynskyi
f627a97d24
loader: use portable way of path joining
2023-01-11 04:12:13 +02:00
Andrew Hlynskyi
108d0ecede
loader: add TREE_SITTER_LIBDIR; cli: add --libdir to tree-sitter generate
...
Closes #1336
2023-01-06 10:28:47 +02:00
Max Brunsfeld
7dc81303f6
Get wasm store working with parser with stateless external scanners
2022-11-15 17:14:33 -08:00
Max Brunsfeld
d47713ee4a
Integrate WASM compilation into the CLI's Loader
2022-11-15 17:14:33 -08:00
Amin Yahyaabadi
8a5620ce15
Use serde's derive feature
2021-10-05 02:38:18 -05:00
Andrew Hlynskyi
62d79b80e1
feat(cli): add a flag to compile a parser in debug mode with -O0 C/C++ compiler flag
2021-09-13 13:48:02 +03:00
Andrew Hlynskyi
52e6c900c3
fix(lib): fix segfault on ts_query_new with incompatible grammar version, close #1318
2021-09-03 14:24:18 +03:00
Andrew Hlynskyi
2921386444
feat(cli/loader): Add TREE_SITTER_INTERNAL_BUILD C/C++ compiler definition
2021-06-30 18:53:07 +03:00
toyboot4e
56b215e5be
allow ~ or $HOME in parser-directories
2021-06-30 23:29:57 +09:00