Andrew Hlynskyi
e985d0e743
cicd: pin rust toolchain to 1.71.1 for all mips targets
2023-08-25 17:36:03 +03:00
Andrew Hlynskyi
b22e4fe3c9
chore: fix a wasm bash test
2023-08-25 17:36:03 +03:00
Amaan Qureshi
39bbd9867d
Merge pull request #2554 from amaanq/debug-bug
...
fix(query): debug print uses wrong variable
2023-08-23 17:36:51 -04:00
Andrew Hlynskyi
7ac69ed1b7
Merge pull request #2556 from ahlinc/fix-alias-on-anon
...
fix(gen): cycle between aliases and anonymous symbols
2023-08-23 18:31:23 +03:00
Amaan Qureshi
1dbb986515
chore: add a test for an aliased anonymous symbol with flags
2023-08-23 16:55:12 +03:00
Andrew Hlynskyi
683fe442e4
fix(gen): cycle between aliases and anonymous symbols
...
An example of an error cycle in a `parser.c`:
```
static const TSSymbol ts_symbol_map[] = {
...
[anon_sym_RBRACE] = anon_sym_RBRACE2,
[anon_sym_RBRACE2] = anon_sym_RBRACE,
...
};
```
2023-08-23 16:51:05 +03:00
Amaan Qureshi
5c7098dd56
fix(query): debug print uses wrong variable
2023-08-22 19:22:31 -04:00
Andrew Hlynskyi
b4649fbb56
Merge pull request #2552 from ahlinc/fix-2551
...
fix: `make install` BSDs don't have `-t` option
2023-08-22 17:47:18 +03:00
Andrew Hlynskyi
bba9809390
fix: make install BSDs don't have -t option
2023-08-22 16:33:03 +03:00
Amaan Qureshi
49c35b3f93
Merge pull request #2550 from amaanq/self-parent-set
...
fix(injections): only allow setting self/parent via `#set!`
2023-08-22 02:17:33 -04:00
Amaan Qureshi
95ab103f48
docs: update injection properties
2023-08-22 01:36:25 -04:00
Amaan Qureshi
cd0bdf586f
fix(injections): only allow setting self/parent via #set!
2023-08-22 01:27:00 -04:00
Amaan Qureshi
e716e2e45a
Merge pull request #2544 from amaanq/injection-parent
...
`@injection.parent`
2023-08-21 17:31:45 -04:00
Andrew Hlynskyi
80b68953df
Merge pull request #2549 from DennySun2100/master
...
fix: GCC pragma causes warning on non-GNU compilers
2023-08-21 22:34:16 +03:00
DennySun2100
f4a6134461
GCC pragma causes warning on non-GNU compilers
2023-08-21 11:54:09 -07:00
Andrew Hlynskyi
535434f208
Merge pull request #2543 from ahlinc/fix-2542
...
fix: `make install` should install files with default perms
2023-08-21 11:34:20 +03:00
Amaan Qureshi
e3a5863287
feat: add @injection.parent to inject an injection's node with the parent language
2023-08-21 01:08:17 -04:00
Amaan Qureshi
da6affaf94
feat: allow @injection.self to inject the node w/ itself
2023-08-21 00:53:04 -04:00
Andrew Hlynskyi
897c187786
fix: make install should install files with default perms
2023-08-21 06:19:49 +03:00
Andrew Hlynskyi
023e0f2503
Merge pull request #2540 from ahlinc/build-bindgen
...
feat: optionally generate Rust bindings during build process
2023-08-21 04:01:41 +03: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
Amaan Qureshi
62823fc333
Merge pull request #2538 from amaanq/unsafety
...
fix(safety): mark functions that potentially deref a raw pointer as unsafe
2023-08-19 20:27:30 -04:00
Amaan Qureshi
c332066666
fix(safety): improve docs for unsafe C functions
2023-08-19 19:49:29 -04:00
Andrew Hlynskyi
ffae7d6115
fix: mark helper Rust funcs that receive raw pointers as unsafe
2023-08-20 02:12:51 +03:00
Amaan Qureshi
ac579be788
fix(safety): mark functions that potentially deref a raw pointer as unsafe
2023-08-19 18:59:11 -04:00
Amaan Qureshi
c37dd2458b
Merge pull request #2529 from amaanq/injection-self
...
feat: add `injection.self` to inject a node with itself
2023-08-19 12:43:10 -04:00
Andrew Hlynskyi
28000dda98
Merge pull request #2534 from ahlinc/serde-pin
...
rust: pin serde version due to serde-rs/serde#2538
2023-08-19 19:33:27 +03:00
Andrew Hlynskyi
59b8eaf911
rust: pin serde version on 1.0.171 due to serde-rs/serde#2538
2023-08-19 16:15:47 +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
ab09ae20d6
Merge pull request #2530 from jamessan/Werror-only-ci
...
Remove -Werror from default CFLAGS
2023-08-18 17:21:48 -04:00
James McCoy
545ef842de
Remove -Werror from default CFLAGS
...
Production builds shouldn't include -Werror by default since that could
cause spurious build failures when there are toolchain updates.
CI uses -Werror to prevent warnings, so that should be sufficient.
2023-08-18 14:23:19 -04:00
Amaan Qureshi
7d953eb5ba
Merge pull request #2466 from tom95/add-field-name-for-child
...
Web Bindings: Expose fieldNameForChild C function
2023-08-18 12:20:39 -04:00
Amaan Qureshi
35a6052fbc
Merge pull request #2412 from amaanq/apply-all-captures
...
feat: add an `--apply-all-captures` argument to highlight & test
2023-08-17 23:38:18 -04:00
Amaan Qureshi
ce4a9ef4de
feat: allow specifying an input query-paths argument
2023-08-17 22:21:20 -04:00
Amaan Qureshi
9971e5d5f5
feat: allow specifying an input captures-path argument
2023-08-17 22:20:57 -04:00
Amaan Qureshi
458b5de0fc
feat: add any-of predicate
2023-08-17 22:20:57 -04:00
Amaan Qureshi
8eb92d1c64
feat: add an --apply-all-captures argument to highlight & test
2023-08-17 22:20:57 -04:00
Max Brunsfeld
f6a0692bea
Merge pull request #2526 from tree-sitter/node-count-error-recovery-regression
...
Fix error recovery regression due to stack node_count change
2023-08-17 17:57:43 -07:00
Max Brunsfeld
9564e1706d
Fix error recovery regression due to stack node_count change
2023-08-17 17:21:31 -07:00
Andrew Hlynskyi
70766f5327
Merge pull request #2522 from ahlinc/dump-corpus-edits
...
test: add `TREE_SITTER_DUMP_EDITS` env var to dump corpus edits
2023-08-18 00:45:26 +03:00
Andrew Hlynskyi
6616d7deeb
Change edit dumps format and add indexes for all corpus tests
...
The new dumped edits format is `edit.<SEED>.<TEST_INDEX>.<SEED_INDEX>.<TEST_NAME>`
To cleanup edits:
- Instead of the standard:
> rm target/scratch/edit.*
- Use the following shell command:
> find target/scratch/ -name 'edit.*' -delete
2023-08-18 00:02:21 +03:00
Andrew Hlynskyi
caaa533b8d
test: add TREE_SITTER_DUMP_EDITS env var to dump corpus edits
...
It dumps edits to the `target/scratch` folder in a format like `<SEED>.edit`
2023-08-17 20:55:28 +03:00
Andrew Hlynskyi
e0e0763d29
Merge pull request #2516 from ahlinc/debug-grammars-in-tests
...
Add `TREE_SITTER_GRAMMAR_DEBUG` env var to use debug grammars in tests
2023-08-17 19:06:10 +03:00
Andrew Hlynskyi
e9bed05c7c
chore(ci): explicitly define halt on error for ASAN detected issues
2023-08-17 18:26:08 +03:00
Andrew Hlynskyi
0dd85c8452
Add TREE_SITTER_GRAMMAR_DEBUG env var to use debug grammars in tests
2023-08-17 18:16:41 +03:00
Andrew Hlynskyi
5fbb2775aa
Merge pull request #2515 from ahlinc/clib-fix-vis2
...
fix(lib): expose only symbols defined in `api.h`
2023-08-17 18:10:09 +03:00
Andrew Hlynskyi
f9e8802234
Use the same flags in lib's build.rs as in Makefile
2023-08-17 16:27:52 +03:00
Andrew Hlynskyi
113d100250
Add an optional strip step to the Makefile
...
It can be used like:
> make clean && make -j CC=clang AR=llvm-ar STRIP=llvm-strip
2023-08-17 15:39:14 +03:00
Andrew Hlynskyi
5e3df64a46
fix(lib): expose only symbols defined in api.h
2023-08-17 15:01:47 +03:00