Amaan Qureshi
d87d4592e0
test(rust): correct expected and actual spots in assert_eq calls
2024-12-29 00:54:16 -05:00
Will Lillis
4f9869142f
fix(rust): adapt to a few new nightly lints
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 15s
2024-12-28 01:17:04 -05:00
Amaan Qureshi
b70843a033
fix(playground): add dark theme, align ui more akin to upstream playground
2024-12-25 21:23:36 -05:00
Amaan Qureshi
5bd0d11982
fix(playground): ensure local playground is initialized
2024-12-25 21:23:36 -05:00
Amaan Qureshi
bd6aa2be2b
fix(playground): correct link to upstream playground
2024-12-25 21:23:36 -05:00
Amaan Qureshi
dda45cfbb6
docs: move assets to correct path
2024-12-25 21:23:36 -05:00
Amaan Qureshi
f3d50f273b
fix(lib): add saturating subtraction to prevent integer underflow
2024-12-25 04:49:39 -05:00
Amaan Qureshi
043969ef18
docs: migrate to mdbook
CI / checks (push) Waiting to run
Deploy Docs / deploy-docs (push) Waiting to run
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 15s
Check Bindgen Output / check-bindgen (push) Has been cancelled
2024-12-24 20:54:59 -05:00
WillLillis
b747261929
feat(cli): display parse and edit times separately for parse --time
2024-12-23 02:06:13 -05:00
Will Lillis
5d9870ebee
feat(cli): show parse times in testing output
2024-12-23 01:22:37 -05:00
Amaan Qureshi
7d3dbc062d
build: bump deps
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 14s
CI / checks (push) Has been cancelled
Check Bindgen Output / check-bindgen (push) Has been cancelled
2024-12-16 01:22:58 -05:00
Amaan Qureshi
214b3dc2e6
fix(cli): handle nested tags test files
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 13s
2024-12-16 00:25:43 -05:00
Amaan Qureshi
2374bca62a
fix(cli): gracefully handle OOB assertions
2024-12-16 00:15:02 -05:00
Ramkumar Ramachandra
07aaf2322e
fix: keep highlight names list consistent in the docs and cli
...
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-12-15 23:29:43 -05:00
Gabriel Holodak
f279d10aa2
fix(cli): count skipped tests correctly
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 15s
2024-12-15 16:09:51 -05:00
Gabriel Holodak
8de3a2ee13
fix(cli): replace nerd font symbols with unicode symbols
2024-12-15 16:09:51 -05:00
Jonathan Raphaelson
8368f9994d
feat: add flag to output css classes instead of inline styles in HTML highlighter output
...
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
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-12-15 01:43:22 -05:00
Riley Bruins
495fe2a6c5
feat: support querying missing nodes
...
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
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-12-14 14:57:36 -05:00
kylegoetz
cd94dbd57f
feat(cli): don't validate email addresses in init command
...
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
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-12-12 20:00:48 -05:00
Amaan Qureshi
ea9aa018b3
feat(cli): add nushell completions
2024-12-10 19:35:58 -05:00
Will Lillis
c7b218838d
fix: minor issues with CI
...
* update ctor
* pass empty `RUSTFLAGS` when installing cross, overriding
the default `-D warnings`
* fix some clippy lints
* create `target` directory before curling wasmtime lib
2024-12-03 16:41:38 -05:00
Novus Nota
e445532a1f
feat(cli): verify assertions for every carat in tests, not just the first one
...
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 14s
Check Bindgen Output / check-bindgen (push) Has been cancelled
CI / checks (push) Has been cancelled
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-11-28 23:25:49 -05:00
ObserverOfTime
473f0a1a4d
feat(bindings): update some binding files
...
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 13s
Check Bindgen Output / check-bindgen (push) Has been cancelled
CI / checks (push) Has been cancelled
- setup.py
- binding.gyp
2024-11-25 09:45:13 -05:00
ObserverOfTime
a08c4b58ab
fix(bindings): include headers & queries in python sdist
2024-11-25 09:45:13 -05:00
Peter Oliver
8eb4407200
feat(make,cmake): install queries along with parser libraries
...
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2024-11-25 07:59:25 -05:00
Amaan Qureshi
274e60a523
fix: clippy lints
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
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
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
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
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
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
...
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
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
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
ObserverOfTime
02ff0af69c
build(bindings): rename cmake test target
...
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
Amaan Qureshi
350fff24bf
fix(lib): simplify edge cases with zero-width tokens
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
ObserverOfTime
3661689389
feat(bindings): drop language name from node
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
Amaan Qureshi
ce93d8fd9b
feat!: bump internal abi to 15
2024-10-26 17:02:00 +00:00
ObserverOfTime
d3a127a48f
chore(bindings): more small changes
...
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
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
Amaan Qureshi
40606dd632
feat: add version subcommand for versioning grammars
2024-10-18 22:08:57 -04:00
Amaan Qureshi
3b55003fd5
fix(init): use camel name from config in missing spots
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 12s
2024-10-14 19:07:55 -04:00
Amaan Qureshi
38e3e51fca
feat(rust): add Language::node_kind_is_supertype
2024-10-14 17:53:22 -04:00
Will Lillis
4705a3153a
feat: Add CST pretty-printer for parser output
...
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-10-12 18:37:12 -04:00
Amaan Qureshi
72f114fa12
perf(loader): improve language lookup speed
2024-10-12 03:08:57 -04:00
Amaan Qureshi
538a197976
fix(lib): correct unexpected side effect in get_column when the lexer is at EOF
2024-10-08 23:27:42 -04:00
Amaan Qureshi
9c08edb066
build: configure clippy lints at the workspace level
2024-10-08 21:07:41 -04:00
Will Lillis
5c6445edea
chore: misc clippy lints
2024-10-06 17:55:00 -04:00
Amaan Qureshi
cc2caecf7a
build: tweak Cargo.tomls
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 12s
2024-10-06 01:48:43 -04:00
JCWasmx86
099fd4efb7
feat: allow setting the output directory for generated source files
2024-10-05 21:52:07 -04:00
Amaan Qureshi
8943983df6
feat!: properly handle UTF-16 endianness encoding
2024-10-05 21:12:48 -04:00
Amaan Qureshi
6be6a40bdf
fix(cli): do not stop printing dot graphs until edits are re-parsed
2024-10-05 20:08:34 -04:00
ObserverOfTime
21a34f9124
fix(templates): properly replace author email
2024-10-05 17:23:09 -04:00
ObserverOfTime
95f24e0364
chore(templates): update npm packages
2024-10-05 17:23:09 -04:00
Carlo Cabrera
079c69313f
build(make): fix tree-sitter.pc generation ( #3745 )
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 14s
2024-10-05 18:27:21 +03:00
Amaan Qureshi
c611e15a31
chore(cli): minor correction in comments
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 14s
2024-10-05 01:41:05 -04:00
ObserverOfTime
a397b454a3
build(bindings): improve cmake file
...
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 14s
CI / build (push) Failing after 13s
- Use placeholders for version, description, homepage
- Add option for `TREE_SITTER_REUSE_ALLOCATOR`
- Define `TREE_SITTER_DEBUG` in debug mode
2024-10-04 11:15:29 -04:00
ObserverOfTime
1d76ec3a1c
feat: drop legacy binding updates
2024-10-04 11:01:51 -04:00
Amaan Qureshi
2047b22ae5
fix(generate): move generated header files into the generate crate
2024-10-04 00:47:30 -04:00
Amaan Qureshi
671a075fd6
fix(build): force rebuild parsers when build is invoked
2024-10-03 22:00:13 -04:00
Sergio A. Vargas
e4dec3d3d8
fix(generate): add *.scm section to .editorconfig template
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 14s
2024-10-03 16:41:47 -04:00
Amaan Qureshi
19c33b1ef7
fix(build): correct wasm root path lookup
2024-10-03 16:23:55 -04:00
Amaan Qureshi
8500e331eb
fix(init): do not migrate package.json on error
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 13s
2024-10-02 16:25:29 -04:00
ObserverOfTime
c3d45a0153
fix(init): don't prompt to reconfigure
...
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 13s
This allows the command to be used in scripts or CI
2024-10-01 11:37:57 -04:00
ObserverOfTime
608506cb57
fix(init): fix some schema issues
...
- Validate CamelCase name, TextMate scope
- Skip serialization of unused properties
- Disallow additional properties in schema
2024-10-01 11:37:57 -04:00
Riley Bruins
0683136ca0
feat(api): expose function to check if symbol represents a supertype
CI / sanitize (push) Failing after 11s
CI / build (push) Failing after 12s
CI / checks (push) Has been cancelled
2024-09-30 14:44:13 -04:00
ObserverOfTime
939e61c58d
build(bindings): add CMakeLists.txt file
2024-09-30 14:43:55 -04:00
Amaan Qureshi
03313dbbf0
fix(bindings): lower go version to 1.22
2024-09-30 14:00:25 -04:00
Amaan Qureshi
f2e1aa3d72
fix(bindings): use RUST_BINDING_VERSION in Cargo.toml template
2024-09-30 14:00:25 -04:00
Amaan Qureshi
934a2814fd
fix: deprecate child_containing_descendant and add child_with_descendant instead
2024-09-30 13:57:28 -04:00
Amaan Qureshi
2e3504a422
fix(cli): generate the parser version from the config as well
2024-09-30 13:23:43 -04:00
Amaan Qureshi
ea3846a2c5
feat: move tree-sitter configuration to dedicated file ( #3700 )
2024-09-30 11:11:23 -04:00
Ron Panduwana
a83b893016
fix: handle more cases of editing subtrees that depend on column values
2024-09-29 20:36:08 -04:00
Amaan Qureshi
2fffe036e0
fix: correct test name parsing when the prior test has equal signs
2024-09-29 19:58:00 -04:00
buckynbrocko
4dad379928
feat: add --overview-only to test subcommand
2024-09-29 18:49:51 -04:00
Jeong, Hun
bbc1370dd5
feat(lib)!: treat nodes' end ranges exclusively in goto_first_child_for_{byte,point}
...
This goes back on #1640 , because now cursors are bi-directional, and
going to the previous sibling is simple.
2024-09-29 17:45:07 -04:00
Riley Bruins
b36ef4b7f4
fix(lib)!: child_containing_descendant now returns direct children
...
Previously, `child_containing_descendant` would return `null` when
called on a node's direct parent. In my opinion, this doesn't make much
sense; it seems like a node would contain itself. This (breaking)
commit changes the function so that it can return direct children.
2024-09-29 17:44:37 -04:00
Lukas Seidel
6b1ebd3d29
feat!: implement StreamingIterator instead of Iterator for QueryMatches and QueryCaptures
...
This fixes UB when either `QueryMatches` or `QueryCaptures` had collect called on it.
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-09-29 17:34:48 -04:00
ObserverOfTime
12007d3ebe
feat(init): add an update flag
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 13s
CI / checks (push) Has been cancelled
2024-09-28 14:19:07 -04:00
Amaan Qureshi
871e8966c5
build: bump deps
2024-09-28 13:58:58 -04:00
ObserverOfTime
ffc942a95b
Update cli/src/main.rs
...
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2024-09-28 13:55:21 -04:00
ObserverOfTime
d0974e876e
feat(generate): add a no-op --no-bindings flag
2024-09-28 13:55:21 -04:00
Amaan Qureshi
31f24395b4
feat: move generate logic to its own crate
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 14s
2024-09-27 17:04:21 -04:00
Amaan Qureshi
90efa34608
chore: clippy fixes
2024-09-27 16:32:48 -04:00
Amaan Qureshi
b2359e4020
feat!: move generation of grammar files to an init command
...
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 14s
The generate subcommand should stick to solely generating a parser and
headers.
2024-09-27 16:06:57 -04:00
Amaan Qureshi
0c43988a5e
fix(lib): correct descendant-for-range behavior with zero-width tokens
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 13s
2024-09-27 00:37:13 -04:00
Amaan Qureshi
9ef12624c3
feat(cli): add a no-ranges flag to the parse command
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 13s
2024-09-26 22:43:01 -04:00
Amaan Qureshi
e04387258b
feat(schema): misc improvements
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 13s
CI / checks (push) Has been cancelled
2024-09-24 15:51:26 -04:00
Amaan Qureshi
86d3a5313d
fix: disallow empty string literals in rules
2024-09-24 15:36:38 -04:00
Amaan Qureshi
1708a295a8
fix: do not generate spurious files if the grammar path is not the default path
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 13s
2024-09-24 14:34:52 -04:00
Amaan Qureshi
bc072a52f8
refactor(cli): break out subcommand logic into separate functions
...
Co-authored-by: buckynbrocko <77247638+buckynbrocko@users.noreply.github.com>
2024-09-24 13:23:49 -04:00
Amaan Qureshi
1f0feb5254
feat: add shell completions
2024-09-24 12:46:38 -04:00
Amaan Qureshi
d3c262a104
fix(test): correctly handle assertions on empty lines
...
Also fixes assertions for captures spanning on multiple lines.
Co-authored-by: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
2024-09-24 12:36:33 -04:00
Amaan Qureshi
cc4378e751
feat(test): test all queries
...
Fallback to default testing for all queries present in the parser's
queries directory.
For a given query <QUERY>.scm, the test files are searched in
test/<QUERY>/*
Also mimic the output of other test-running subcommands when testing
queries.
Co-authored-by: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
2024-09-24 12:36:33 -04:00
Amaan Qureshi
52f696096d
feat: provide a rebuild flag to force rebuild parsers
2024-09-24 11:27:59 -04:00
Samuel Tardieu
1aa28e04ee
style(tests): do not use .as_bytes().len() on strings
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 13s
CI / checks (push) Has been cancelled
2024-09-22 20:27:38 -04:00
Will Lillis
99dbbbcbe9
fix(fuzz): skip tests marked with :skip & don't report errors on tests marked with :error
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 13s
2024-09-22 03:46:52 -04:00
Amaan Qureshi
4934a16173
feat: add root field in node-types.json
2024-09-22 01:48:03 -04:00
Amaan Qureshi
6f050f0da5
fix: properly handle utf8 code points for highlight and tag assertions
2024-09-22 01:03:59 -04:00
Amaan Qureshi
0a85744eba
fix(lib): peek at the next sibling when iterating to find the child that contains a given descendant
...
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 13s
This issue shows up when we have a zero-width token that is the target
descendant node, previously the previous sibling would be returned as
the child that contains the descendant, which is incorrect.
2024-09-17 04:37:43 +02:00
ObserverOfTime
6e19fccf39
chore(bindings): update rust lib docs
2024-09-17 03:40:48 +02:00
Dave Abrahams
112acd5b93
fix(generate): remove excludes in Package.swift
2024-09-16 21:40:21 -04:00
Hanlu
ff813a311b
fix: correct comment quote
2024-09-16 21:39:49 -04:00
Will Lillis
b0e8e50a19
fix(cli): remove duplicate short options from fuzz command ( #3635 )
...
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 13s
CI / checks (push) Has been cancelled
- Remove short option from fuzz command edits option
- Remove short option from fuzz command iterations option
2024-09-15 11:04:12 +03:00
Amaan Qureshi
7e3f572655
feat: add field_name_for_named_child
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 12s
CI / checks (push) Has been cancelled
2024-09-09 11:05:29 -04:00
Amaan Qureshi
d8ab779df4
fix(generate): do not generate large character sets for unused variables
2024-09-08 15:42:18 -04:00
Amaan Qureshi
cbd3bb5b9a
feat!: remove the build-wasm subcommand
...
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 11s
CI / build (push) Failing after 11s
`build --wasm` should be used instead
2024-09-08 13:41:26 -04:00
Amaan Qureshi
10e474f488
feat!: remove filter flag from commands in favor of include and exclude
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 11s
CI / build (push) Failing after 12s
2024-09-07 20:53:04 -04:00
Amaan Qureshi
5e46fef0d7
chore: clippy lints
2024-09-07 20:31:20 -04:00
Jinser Kafka
fd190f1d9d
fix(cli): keep skipped tests unchanged in the test/corpus
2024-09-07 18:55:49 -04:00
Amaan Qureshi
4d3d1f0df2
fix(generate): add tree-sitter to the dev-dependencies of the Cargo.toml
2024-09-07 17:46:09 -04:00
Amaan Qureshi
272ebf77b9
fix(test): retain attributes when running test -u
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 13s
2024-09-01 06:18:55 -04:00
Amaan Qureshi
0a486d508f
fix(test): exit with an error if a test marked with :error has no error
2024-09-01 06:18:55 -04:00
Amaan Qureshi
ee06325f67
fix(lib): correct extra node creation from non-zero root-alias cursors
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 13s
2024-08-31 23:58:19 -04:00
Amaan Qureshi
53cc93c267
fix(generate): disallow inline variables referencing themselves
...
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 13s
This fixes an infinite loop bug
2024-08-31 16:57:23 -04:00
Amaan Qureshi
3f424c0121
feat: add an API to time out query executions
...
Currently, if a predicate is hard to match on the Rust side, a sizable
query against a very large file can take forever, and ends up hanging.
This commit adds an API function `ts_query_cursor_set_timeout_micros` to
limit how long query execution is allowed to take, thereby negating the
chance of a hang to occur.
2024-08-31 14:33:28 -04:00
Amaan Qureshi
d0125ef387
feat(bindings): bump go-tree-sitter version
2024-08-29 22:50:27 -04:00
Amaan Qureshi
278526ef75
fix(cli): remove conflicting short flags in the fuzz subcommand
2024-08-29 22:07:41 -04:00
Amaan Qureshi
b5a91a4a85
feat(generate): bump tree-sitter dev dependency to 0.23
2024-08-29 22:07:33 -04:00
Amaan Qureshi
253a112dd4
fix(generate): remove necessary files from gitignore template
2024-08-29 21:50:20 -04:00
Amaan Qureshi
fc4d7bd995
fix(cli): dedup preceding_auxiliary_symbols
2024-08-26 09:03:08 -04:00
ObserverOfTime
ff8b50caa6
build(bindings): use language version in soname
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 12s
2024-08-25 15:03:13 -04:00
Amaan Qureshi
6ef76858c0
fix!: revert interning of a sequence or choice of a single rule
...
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 12s
This reverts commit 252e2a4bc0
2024-08-24 19:43:04 -04:00
Amaan Qureshi
973b01071e
fix(go): update parser name in binding files, add to docs
2024-08-24 19:24:06 -04:00
Amaan Qureshi
2150c91114
fix(bindings): update go bindings
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 12s
2024-08-23 23:51:04 -04:00
Ryan Patterson
b5e4ef6d9a
clone wasm store engine ( #3542 )
...
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 13s
This resolves https://github.com/tree-sitter/tree-sitter/issues/3454 .
This brings the usage of wasmtime::Engine in line with how wasmtime
intends it to be used. All wasmtime functions that receive an Engine
always receive an `&Engine`, never an owned `Engine`. They are always
responsible for cloning the reference if they need it.
This brings the usage of wasmtime::Engine in line with how TSParser
treats TSLanguages: when setting a language to the parser, the parser is
responsible for cloning the reference to the TSLanguage. It is
counterintuitive for TSParser to have different behavior when receiving
wasmtime_engine_t.
C API users also expect this behavior, see "Memory Management"
[here](https://docs.wasmtime.dev/c-api/wasm_8h.html ). Talking about the
C API: without this change, failing to clone the `wasmtime_engine_t`
(which, again, is never something API users need to do in wasmtime) and
then reusing the engine in multiple TSLanguages results in a use after
free. With this change, failing to call `wasm_engine_delete` on your
owned Engine results in a memory leak. Memory leaks are safer than
use-after-free.
2024-08-22 08:01:37 -07:00
ObserverOfTime
f459c3d872
feat(bindings)!: use capsules in python
2024-08-20 12:33:11 +03:00
Amaan Qureshi
6dd459b4ab
fix(lib): an empty root node should not precede an empty range
...
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 13s
The problem is, given an empty file, the root node of this file spans 0
bytes. As such, the logic for determining whether or not the node
precedes the range fails, and is true when it should be false.
2024-08-17 17:05:26 -04:00
Ron Panduwana
2bb20fe2fe
feat: allow external scanners to use the logger
...
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2024-08-17 14:46:28 -04:00
Amaan Qureshi
fec6c77da8
fix(generate): rename cargo.toml template
...
CI / checks (push) Waiting to run
CI / sanitize (push) Failing after 11s
CI / build (push) Failing after 12s
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
buckynbrocko
7583d394b4
feat(cli): add --show-fields flag to test command ( #3502 )
CI / sanitize (push) Failing after 13s
CI / build (push) Failing after 13s
CI / checks (push) Has been cancelled
2024-08-03 21:54:18 +03:00
Ryan Patterson
779566f588
Reset language when resetting wasm store ( #3495 )
...
CI / sanitize (push) Failing after 12s
CI / build (push) Failing after 12s
CI / checks (push) Has been cancelled
* Reset language when resetting wasm store
* test behavior of language copying
2024-07-31 10:30:58 -07:00
ObserverOfTime
3950dddfde
fix(rust): fix new clippy warnings
2024-07-28 10:12:32 +03:00
Amaan Qureshi
25c7189180
feat(lib): add ts_query_end_byte_for_pattern
2024-07-07 20:29:09 -04:00
Amaan Qureshi
a59a530049
fix(dsl): improve error message when a rule function returns undefined
2024-07-05 19:11:01 -04:00