Commit graph

387 commits

Author SHA1 Message Date
Amaan Qureshi
fec6c77da8 fix(generate): rename cargo.toml template
This fixes issues with vendoring on case-insensitive file systems
2024-08-17 01:39:52 -04:00
ObserverOfTime
2eeeed0f2a fix(make): fail properly on Windows 2024-08-17 00:51:27 -04:00
Amaan Qureshi
a59a530049 fix(dsl): improve error message when a rule function returns undefined 2024-07-05 19:11:01 -04:00
Amaan Qureshi
6ec478c1e9 fix: do not "absorb" rules that consist of a single terminal if the rule is hidden 2024-06-21 20:20:02 -04:00
Amaan Qureshi
252e2a4bc0 fix: intern a sequence or choice of a single element the same as the element itself 2024-06-21 20:20:02 -04:00
Amaan Qureshi
a73191bf0e fix: better error when a supertype rule is invalid 2024-06-03 06:35:27 -04:00
Amaan Qureshi
e553578696 feat: add fuzz subcommand 2024-05-30 23:00:45 -04:00
Max Brunsfeld
38137c71b2 feat!: introduce tree-sitter-language crate for grammar crates to depend on
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-05-24 21:54:07 -04:00
ObserverOfTime
04b9eb5700 feat(bindings): update npm scripts 2024-05-24 17:35:12 -04:00
ObserverOfTime
629395fd58 feat(bindings): add node, python, swift tests 2024-05-24 16:55:05 -04:00
ObserverOfTime
055d0cbd34
feat(dsl)!: support other JS runtimes 2024-05-24 16:53:33 -04:00
ObserverOfTime
d77279d2e3 style(bindings): fix indent & line endings
- Use 2 spaces for parser.c
- Don't force LF line endings
2024-05-24 15:45:48 -04:00
ObserverOfTime
fd0e1c7b5b
feat(bindings): add query constants to python 2024-05-24 15:31:38 -04:00
Amaan Qureshi
b1fd3214db feat(cli): bump unicode data to v15.1.0 2024-05-06 15:25:42 -04:00
Amaan Qureshi
1e219ff9eb fix(cli): properly account for multi-grammar repos when using docker to build a wasm parser 2024-05-05 14:56:42 -04:00
ObserverOfTime
a2d2da314d fix(cli): keep default cc flags in build 2024-05-05 13:06:45 -04:00
Amaan Qureshi
627617edb4 refactor(tests): migrate remaining grammar.json tests to grammar.js 2024-04-29 00:01:35 -04:00
Amaan Qureshi
26fa3a76a5 fix(generate): take AsRef<Path> for the path parameter to avoid clones 2024-04-27 17:09:36 -04:00
ObserverOfTime
5aad87a74c fix(generate): don't check arbitrarily named dirs
i.e. check `bindings/swift` rather than `bindings/swift/TreeSitterFoo`
since the dir name may have different casing (e.g. `TreeSitterFOO`)
2024-04-27 17:09:36 -04:00
Amaan Qureshi
41308888fc fix: don't error out on package.json lookup errors if --no-bindings is passed 2024-04-27 16:29:26 -04:00
Amaan Qureshi
517e61b3e6 fix: improve error message when the tree-sitter field is malformed 2024-04-27 16:29:26 -04:00
ObserverOfTime
83b6010461 feat(grammar): add "inherits" field if available 2024-04-14 15:59:01 -04:00
Max Brunsfeld
295344b142 fix: Avoid generating unused character set constants 2024-04-14 09:57:10 -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
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
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
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
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