Amaan Qureshi
6f050f0da5
fix: properly handle utf8 code points for highlight and tag assertions
2024-09-22 01:03:59 -04:00
Amaan Qureshi
c440f2a7c6
refactor: remove ansi_term dependency
2024-05-25 21:09:28 -04:00
WillLillis
946acfd70f
feat(cli): support NO_COLOR
...
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
This allows users to avoid colored output when NO_COLOR is set to 1.
2024-04-29 20:25:41 -04:00
Amaan Qureshi
b35efa8f33
style: format imports
2024-04-11 22:35:43 -04:00
Amaan Qureshi
e996c32108
refactor!: remove the apply-all-captures flag, make last-wins precedence the default
2024-02-16 12:34:12 -05:00
Amaan Qureshi
21f25a5305
feat: improve error message for files with an unknown grammar path
2024-02-12 17:17:37 -05:00
Amaan Qureshi
04ff704bca
chore(cli): apply clippy fixes
2024-02-04 04:18:48 -05:00
Max Brunsfeld
da16cb1459
Introduce language ref-count management C APIs, remove Copy impl for Language in Rust
2023-12-27 14:59:16 -08:00
Max Brunsfeld
f4e2f68f14
Merge branch 'master' into wasm-language
2023-10-27 12:11:43 +01:00
Amaan Qureshi
ce4a9ef4de
feat: allow specifying an input query-paths argument
2023-08-17 22:21:20 -04:00
Amaan Qureshi
8eb92d1c64
feat: add an --apply-all-captures argument to highlight & test
2023-08-17 22:20:57 -04:00
Eddie Hatfield
14aa23b1e1
feat: run highlight tests in subdirectories
2023-08-03 19:11:28 +01:00
Amaan Qureshi
68b1006a3b
feat: add negative assertions, remove duplicate code
2023-07-25 00:27:34 -04:00
Max Brunsfeld
555277a102
Allow testing highlight and tag queries when testing wasm build
...
Replace non-mutating `ts_parser_wasm_store` function with
`ts_parser_take_wasm_store`, which removes and returns the wasm
store, in order to facilitate single ownership.
2023-01-23 11:46:59 -08:00
Douglas Creager
66c30648c2
rust: Extract runtime language detection into separate crate
...
This patch adds a new `tree-sitter-loader` crate, which holds the CLI's
logic for finding and building local grammar definitions at runtime.
This allows other command-line tools to use this logic too!
2021-06-09 17:42:30 -04:00
Douglas Creager
d2d01e77e3
cli: Use anyhow and thiserror for errors
...
This patch updates the CLI to use anyhow and thiserror for error
management. The main feature that our custom `Error` type was providing
was a _list_ of messages, which would allow us to annotate "lower-level"
errors with more contextual information. This is exactly what's
provided by anyhow's `Context` trait.
(This is setup work for a future PR that will pull the `config` and
`loader` modules out into separate crates; by using `anyhow` we wouldn't
have to deal with a circular dependency between with the new crates.)
2021-06-09 16:17:23 -04:00
Patrick Thomson
f3d16f4770
Fix tests.
2020-11-23 11:34:56 -05:00
Patrick Thomson
50bccdf5da
rename Assertion.expected to expected_capture_name
2020-11-10 16:20:51 -05:00
Patrick Thomson
1aee60a7c0
propitiate the tests
2020-10-26 14:35:18 -04:00
Patrick Thomson
6adeb7b40d
move shared code to query_testing
2020-10-26 14:27:33 -04:00
Patrick Thomson
1012bea3f4
let's start sharing this code
2020-10-26 13:35:10 -04:00
Max Brunsfeld
519a1369ce
In highlight test, reset included ranges before finding assertions
2020-06-15 10:51:34 -07:00
Max Brunsfeld
4b9feccd13
Run syntax highlighting tests as part of the main test command
...
Also, allow `corpus` to be in the `test/corpus` directory, and expect
highlighting tests to be in the `test/highlight` directory.
2019-12-05 15:28:16 -08:00
Max Brunsfeld
6dbfbaed07
Start work on a system for testing syntax highlighting
2019-12-05 09:45:54 -08:00