Commit graph

1273 commits

Author SHA1 Message Date
ObserverOfTime
83b6010461 feat(grammar): add "inherits" field if available 2024-04-14 15:59:01 -04:00
Max Brunsfeld
cdd4688860 0.22.5 2024-04-14 10:17:04 -07:00
Max Brunsfeld
295344b142 fix: Avoid generating unused character set constants 2024-04-14 09:57:10 -07: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
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
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
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
Max Brunsfeld
be34bc9430 Identify large char sets for lexer using NFA transitions 2024-04-09 17:53:37 -07:00
Amaan Qureshi
21c06101aa fix(bindings): remove required platforms for swift 2024-04-08 17:56:05 -04:00
Amaan Qureshi
0d2dea9e0e fix(test): allow colons in test names 2024-04-08 17:56:05 -04:00
Amaan Qureshi
a9172e0caa fix: add a semicolon after SKIP macros 2024-04-08 17:56:05 -04:00
Amaan Qureshi
abed43a169 chore: clippy fix 2024-04-08 17:56:05 -04:00
ObserverOfTime
78b6067a5d fix(parser): fix variadic macro 2024-04-02 03:18:05 -04:00
Max Brunsfeld
39be6972fe Use static arrays and a fixed binary search for large char set checks 2024-03-29 23:00:48 -07:00
Amaan Qureshi
62cd13a3de test: add regression test for node parent + string bug 2024-03-20 19:23:08 -04:00
Max Brunsfeld
09b18fad5b
Merge pull request #3181 from tree-sitter/handle-wasm-oom
When loading languages via WASM, gracefully handle memory errors and leaks in external scanners
2024-03-18 13:15:06 -07:00
Max Brunsfeld
fed9b98d6c Clean up wasm store construction, avoid hard-coding initial memory size
Retrieve the initial memory size from the stdlib's memory import type.
2024-03-17 10:20:18 -07:00
Max Brunsfeld
7a9b3076ef Handle memory errors occurring in wasm scanners
* In WASM, use a custom, simple malloc implementation that lets us
  expicitly reset the heap with a new start location.
* When a WASM call traps or errors, propagate that as a parse failure.
* Reset the WASM heap after every parse.

Co-authored-by: Conrad <conrad@zed.dev>
2024-03-17 10:19:42 -07:00
Amaan Qureshi
fc15f62133
0.22.2 2024-03-17 07:31:58 -04:00
ObserverOfTime
4bbaee2f56 fix(lib): allow hiding symbols 2024-03-17 07:21:06 -04:00
ObserverOfTime
4b12eab927 feat(lib): implement Display for Node 2024-03-17 06:12:28 -04:00
Amaan Qureshi
e8dbe011d3 test: fix header writes 2024-03-17 05:36:30 -04:00
Amaan Qureshi
754aa62e89 chore: turbofish styling 2024-03-17 05:36:30 -04:00
Amaan Qureshi
99b93d83a1 feat(cli)!: add a separate build command to compile parsers
This allows users to build parsers without having to run `test` or
`parse` to invoke the compilation process, and allows them to output the
object file to wherever they like. The `build-wasm` command was merged
into this by just specifying the `--wasm` flag.
2024-03-17 05:36:30 -04:00
ObserverOfTime
1ff40f5571 fix(lib): makefile installation 2024-03-12 18:14:58 -04:00