Commit graph

1471 commits

Author SHA1 Message Date
Amaan Qureshi 588c1a5610
feat: allow external scanners to reuse the internal character ranges 2024-11-24 17:45:50 -05:00
dependabot[bot] ed23f02784 build(deps): bump cross-spawn from 7.0.3 to 7.0.5 in /cli/eslint
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.5.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.5)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-22 23:18:29 -05:00
Amaan Qureshi 274e60a523
fix: clippy lints
Some checks failed
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 15s
Check Bindgen Output / check-bindgen (push) Has been cancelled
CI / checks (push) Has been cancelled
2024-11-16 03:20:59 -05:00
Riley Bruins 78e5144f3f feat: generate schema in tree-sitter.json
Some checks failed
Check Bindgen Output / check-bindgen (push) Waiting to run
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 14s
2024-11-16 00:38:58 -05:00
Amaan Qureshi 05b2f443ba
fix: clippy lint 2024-11-15 23:54:18 -05:00
Riley Bruins fa6c1471ef
fix(lib): correct escape detection for invalid anonymous nodes
The current quotation escape checker fails in the case that
there is an anonymous node that is just an escaped backslash (it thinks
the backslash escapes the quote, when really it is just an escaped
backslash itself. See the added test case for an example of this).

This commit ensures the node identification logic keeps track of the
number of backslashes seen so it can accurately determine if the
quotation is escaped or not.
2024-11-15 23:49:06 -05:00
dependabot[bot] 0f7d888883 build(deps): bump @eslint/plugin-kit from 0.2.0 to 0.2.3 in /cli/eslint
Bumps [@eslint/plugin-kit](https://github.com/eslint/rewrite) from 0.2.0 to 0.2.3.
- [Release notes](https://github.com/eslint/rewrite/releases)
- [Changelog](https://github.com/eslint/rewrite/blob/main/release-please-config.json)
- [Commits](https://github.com/eslint/rewrite/compare/core-v0.2.0...plugin-kit-v0.2.3)

---
updated-dependencies:
- dependency-name: "@eslint/plugin-kit"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-15 23:45:35 -05:00
Riley Bruins bcf82da55c refactor: reuse symbol variable in subtype map generator
Some checks failed
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 14s
Check Bindgen Output / check-bindgen (push) Has been cancelled
CI / checks (push) Has been cancelled
Tiny change to prevent redundant creation of a symbol value in
`node_types.rs`.
2024-11-13 20:54:57 -05:00
Amaan Qureshi 015547c526 fix: compiler warning
Some checks failed
Check Bindgen Output / check-bindgen (push) Waiting to run
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 14s
2024-11-12 19:10:06 -05:00
crvdgc 15c2957993 fix(xtask): bring back language and example filter 2024-11-12 19:09:49 -05:00
Will Lillis 5d1be545c4
fix(lib): correct next sibling of zero width node 2024-11-12 18:17:45 -05:00
Amaan Qureshi 18e4a2405b fix(loader): don't print warnings if the file is not found
Some checks failed
Check Bindgen Output / check-bindgen (push) Waiting to run
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 12s
2024-11-10 04:53:22 +01:00
Amaan Qureshi d73b66cbbc fix(cmake): use current source dir for EXISTS check 2024-11-10 04:00:32 +01:00
Amaan Qureshi ac4595e808 feat(node): update bindings when necessary 2024-11-10 03:55:58 +01:00
Amaan Qureshi 134233f33a feat(node): support single-file executables via bun build --compile 2024-11-10 03:47:32 +01:00
WillLillis 05b6871a02 feat(loader): support multi-barreled file extensions 2024-11-10 03:44:33 +01:00
Will Lillis 7b90dbf189
feat(loader): add error message when a tree-sitter.json file is invalid 2024-11-09 20:46:29 -05:00
Bastiaan Marinus van de Weerd 0dc1044d0d
feat(loader): add language_for_configuration 2024-11-09 15:09:50 -05:00
ObserverOfTime 1d5502d7b2 chore(bindings): update go binding version 2024-11-09 21:03:38 +01:00
ObserverOfTime 2d5a4b6bd6 chore(bindings): include tree-sitter.json file 2024-11-09 21:03:38 +01:00
ObserverOfTime 8588c96691 fix(bindings): fix scanner check in binding.gyp
Some checks failed
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 14s
Check Bindgen Output / check-bindgen (push) Has been cancelled
CI / checks (push) Has been cancelled
Use `fs.existsSync` rather than `fs.exists`
2024-11-03 06:02:39 -05:00
ObserverOfTime 66a1bc50fa fix(bindings): update CMakeLists.txt file
Some checks failed
Check Bindgen Output / check-bindgen (push) Waiting to run
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 14s
2024-11-02 13:17:11 -04:00
Amaan Qureshi 998d2c9d8c fix(generate): do not set the unit reduction symbol if it's in the extras array
Some checks failed
Check Bindgen Output / check-bindgen (push) Waiting to run
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 12s
2024-11-02 04:20:40 -04:00
Amaan Qureshi 310a9f0704 fix: disallow tokens that match the empty string 2024-11-02 03:36:11 -04:00
WillLillis 5b5cf5a5e5 fix(lib): check point, byte ranges in ts_query_cursor_set
range functions
2024-11-02 03:06:07 -04:00
Amaan Qureshi 7baefa8609 fix(cli): use contains over is in warning 2024-11-02 01:31:46 -04:00
ObserverOfTime 02ff0af69c build(bindings): rename cmake test target
Some checks failed
Check Bindgen Output / check-bindgen (push) Waiting to run
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 14s
CTest creates a test target which breaks the build when the parser is
included via FetchContent in a CMake project that uses CTest
2024-10-31 23:12:28 -04:00
Amaan Qureshi 500f4326d5 feat: add the ability to specify a custom decode function 2024-10-31 22:51:40 -04:00
Amaan Qureshi e27160b118 feat(rust): remove usage of deprecated functions 2024-10-31 21:58:35 -04:00
Sam Estep f3f7230ee3
fix(cli): pass all fields to tree-sitter.json in init 2024-10-30 17:09:21 -04:00
Sam Estep c3ec2c251e
docs(rust): add --locked to installation instructions
Some checks failed
Check Bindgen Output / check-bindgen (push) Waiting to run
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 14s
2024-10-30 10:51:46 -04:00
Amaan Qureshi 350fff24bf fix(lib): simplify edge cases with zero-width tokens
Some checks failed
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 13s
CI / checks (push) Has been cancelled
2024-10-28 13:57:29 +00:00
dundargoc a3de650024 fix: make sha generation work with submodules
More specifically, change `is_dir` to `exists` as `.git` is a file when
in a submodule.
2024-10-28 12:16:48 +01:00
dundargoc dc4e232e6e feat: add build sha to parser.c header comment 2024-10-28 12:16:48 +01:00
ObserverOfTime 3661689389 feat(bindings): drop language name from node
Some checks failed
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 12s
2024-10-26 23:53:58 +00:00
ObserverOfTime c5ee0ac070 feat(lib): add the language name 2024-10-26 23:53:58 +00:00
Amaan Qureshi 42dd32d184 build: remove unicode files and script, move cliff.toml 2024-10-26 23:25:12 +00:00
Amaan Qureshi c8cf75fd30 feat(generate)!: use regex_syntax::Hir for expanding regexes
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-10-26 23:25:12 +00:00
Amaan Qureshi ce93d8fd9b feat!: bump internal abi to 15 2024-10-26 17:02:00 +00:00
ObserverOfTime 413b7cbcca build(cli): get build sha via git command
Some checks failed
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 14s
2024-10-26 04:41:10 +00:00
ObserverOfTime 8515986b73 docs(rust): document optional features 2024-10-24 17:08:55 +00:00
ObserverOfTime 7f0c5f928a feat(generate): add a comment with the tree-sitter version 2024-10-24 17:07:15 +00:00
ObserverOfTime d3a127a48f chore(bindings): more small changes
Some checks failed
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 14s
CI / checks (push) Has been cancelled
- Rename cmakelists.txt to cmakelists.cmake
- Bump node-addon-api version in package.json
- Remove License classifier from pyproject.toml
- Move require call to top level in Node.js test
2024-10-20 16:55:27 +00:00
Joel Spadin 9c8a0d47a0 fix(dsl): fix types for RuleBuilder
Some checks failed
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 14s
The second parameter to RuleBuilder should be optional. Fixes #3811.
2024-10-20 01:27:42 +00:00
ObserverOfTime f9a4e8ecdc fix(init): use current path if unspecified 2024-10-19 19:28:51 +00:00
ObserverOfTime 8681960fbc chore(bindings): correct editorconfig indent size 2024-10-19 18:31:46 +00:00
ObserverOfTime c23670264f chore(bindings): drop pkg-config Requires field 2024-10-19 18:31:46 +00:00
ObserverOfTime 4089569934 chore(bindings): improve gitattributes file
- Separate bindings into language sections
- Mark all metadata & lockfiles as generated
2024-10-19 18:31:46 +00:00
ObserverOfTime 5df4706b19 chore(bindings): clean up package.json
- Use PARSER_URL in repository
- Remove tree-sitter section
2024-10-19 18:31:46 +00:00
ObserverOfTime 66dab20462 feat(bindings): auto-detect scanners 2024-10-19 18:31:09 +00:00