Commit graph

5037 commits

Author SHA1 Message Date
Max Brunsfeld
78efd96bbe Crash earlier if native external scanner overflows serialization buffer 2024-04-25 13:55:47 -07:00
Max Brunsfeld
e9fd4ccf0c Guard against serialization buffer overflows from wasm languages 2024-04-25 13:51:05 -07:00
Max Brunsfeld
d7a23cf017 fix: Correctly load field data from wasm languages
Previously, if the last production id in a language did not have
a unique set of fields, the field maps weren't loaded correctly
from wasm.

Co-authored-by: Marshall <marshall@zed.dev>
2024-04-24 16:29:44 -07:00
vanaigr
90e0e28b95
feat: reverse iteration through node parents (#3214) 2024-04-23 15:19:57 +01:00
Liam Rosenfeld
0f125e2d09
fix(rust): use unix + wasi cfg instead of not windows for fd 2024-04-23 10:13:38 -04:00
Max Brunsfeld
af695f3c0a
Merge pull request #3310 from DavisVaughan/fix/regex-typo
Swap `\s` for `\\s` in documentation example
2024-04-21 21:33:39 -07:00
Davis Vaughan
937dfbfbab Swap \s for \\s 2024-04-20 07:51:45 -04:00
Jisuk Byun
4cd23ff6b0
fix(rust): update README example 2024-04-18 13:25:42 -04:00
Adrien Friggeri
01bf431261
fix(wasm): correct childrenFromFieldXXX method signatures
These do not expect a `cursor` parameter
2024-04-16 13:48:53 -04:00
dependabot[bot]
8b28443d5e build(deps): bump cc from 1.0.92 to 1.0.94 in the cargo group
Bumps the cargo group with 1 update: [cc](https://github.com/rust-lang/cc-rs).


Updates `cc` from 1.0.92 to 1.0.94
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.92...1.0.94)

---
updated-dependencies:
- dependency-name: cc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-15 19:16:06 -04:00
Enno T. Boland
3ab3b055ed
docs(highlight): typo 2024-04-14 17:15:43 -04:00
ObserverOfTime
83b6010461 feat(grammar): add "inherits" field if available 2024-04-14 15:59:01 -04:00
Max Brunsfeld
159c34fdff docs: update changelog 2024-04-14 10:19:25 -07:00
Max Brunsfeld
cdd4688860 0.22.5 2024-04-14 10:17:04 -07:00
Max Brunsfeld
32b8794c5c
docs: Add note about 0.22.3 release to CHANGELOG.md 2024-04-14 10:07:30 -07:00
Max Brunsfeld
295344b142 fix: Avoid generating unused character set constants 2024-04-14 09:57:10 -07:00
Mark McCulloh
a7a47d561d
fix(rust): compilation on wasm32-wasi 2024-04-13 18:30:41 -04:00
Amaan Qureshi
9ba8f6dfe6 fix(cli): test parsing on windows 2024-04-12 21:09:28 -04:00
Max Brunsfeld
285257998c 0.22.4 2024-04-12 17:03:02 -07:00
Max Brunsfeld
50d0dfbee9 Always bump at least the patch version in bump xtask
As long as the source code has changed. Previously, the command would do
nothing if there weren't any conventional commits.

* Commit the Cargo.lock in the version bump commit.
* Simplify logic for deciding whether to bump minor or patch version.
2024-04-12 17:02:53 -07:00
Max Brunsfeld
63fa0f23f2 Include 2-character ranges in array-based state transitions 2024-04-12 16:40:04 -07:00
Max Brunsfeld
056237f18b Fix sorting of transitions within a lex state 2024-04-12 16:21:57 -07:00
Max Brunsfeld
a3d338781b 0.22.3 2024-04-12 15:10:49 -07:00
Max Brunsfeld
3b8bfaeaa4
Merge pull request #3234 from tree-sitter/simpler-large-char-set-code
Generate simpler code for matching large character sets
2024-04-12 15:03:13 -07:00
Max Brunsfeld
7ec40b0ab4 Implement single-char state transitions using a static array and for loop
This reduces compile time, compared to generating many individual if statements.
2024-04-12 14:40:11 -07:00
dependabot[bot]
2d26c4c7bb build(deps): bump the cargo group with 2 updates
Bumps the cargo group with 2 updates: [anyhow](https://github.com/dtolnay/anyhow) and [webbrowser](https://github.com/amodm/webbrowser-rs).


Updates `anyhow` from 1.0.81 to 1.0.82
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82)

Updates `webbrowser` from 0.8.14 to 0.8.15
- [Release notes](https://github.com/amodm/webbrowser-rs/releases)
- [Changelog](https://github.com/amodm/webbrowser-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amodm/webbrowser-rs/compare/v0.8.14...v0.8.15)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
- dependency-name: webbrowser
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-12 16:45:53 -04:00
ObserverOfTime
eb09d5757c ci(dependabot): improve PR labels 2024-04-12 16:01:47 -04:00
Max Brunsfeld
3210c7e21f Avoid using a large character set constant when it doesn't reduce code size 2024-04-12 12:01:23 -07:00
Max Brunsfeld
3498498449 Merge branch 'master' into simpler-large-char-set-code 2024-04-12 10:03:46 -07:00
Max Brunsfeld
15fe07a20e Clean up code generation for lexer state transitions 2024-04-12 09:02:33 -07:00
Amaan Qureshi
dcb7acede4 build: update emscripten version 2024-04-11 22:35:43 -04:00
Amaan Qureshi
96d18408a3 refactor(js): misc fixes & tidying 2024-04-11 22:35:43 -04:00
Amaan Qureshi
abc7910381 refactor(rust): misc fixes & tidying 2024-04-11 22:35:43 -04:00
Amaan Qureshi
5825e24d56 style: wrap comments 2024-04-11 22:35:43 -04:00
Amaan Qureshi
b35efa8f33 style: format imports 2024-04-11 22:35:43 -04:00
Amaan Qureshi
a48054f1ae
fix: wrong flag check in build.rs 2024-04-11 22:31:10 -04:00
Max Brunsfeld
1f0707e1ac Fix clippy warnings 2024-04-11 16:29:59 -07:00
Max Brunsfeld
b8701fcf18 Check EOF when checking a large char set that contains the null character 2024-04-11 16:19:21 -07:00
Max Brunsfeld
be6e6d3708 Merge branch 'master' into simpler-large-char-set-code 2024-04-11 16:03:20 -07:00
Max Brunsfeld
18ea74ee12
Merge pull request #3280 from ObserverOfTime/reduce
refactor(parser): make REDUCE macro non-variadic
2024-04-11 15:39:28 -07:00
Ron Panduwana
c051a90ac5 fix: insert "tree-sitter" section in current directory's package.json if it exists
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2024-04-11 17:09:35 -04:00
ObserverOfTime
63babea301 fix: proper function prototypes 2024-04-11 16:28:21 -04:00
ObserverOfTime
50dfd409f6 fix(bindings): generate parser.c if missing 2024-04-11 16:28:21 -04:00
ObserverOfTime
7830877f63 fix(bindings): add utf-8 flag to python & node 2024-04-11 16:27:50 -04:00
ObserverOfTime
818cd8c291
refactor(parser): make REDUCE macro non-variadic 2024-04-11 20:47:08 +03:00
Amaan Qureshi
8bfe4e1f6b fix: add back build-wasm temporarily 2024-04-11 10:48:30 -04:00
Ron Panduwana
33de5ef849 fix: default output directory for build --wasm should use current_dir 2024-04-11 10:48:30 -04:00
Amaan Qureshi
895c7680e7 fix(windows): add /utf-8 flag for parsers using unicode symbols 2024-04-11 09:44:51 -04:00
Sebastian Lackner
5dc62cc828
fix(cli): fix mismatched parenthesis when accounting for && 2024-04-11 09:01:56 -04:00
Max Brunsfeld
3d088888f5 Derive large character sets from lex states for individual tokens 2024-04-10 16:53:39 -07:00