Andrew Hlynskyi
4f28ce4e3b
Add async context tests for Node and TreeCursor
2023-08-03 03:03:03 +03:00
Michael Davis
3e499d675a
CLI: Re-use highlight cancellation flag for HTML highlights
...
The `html` highlight function created its own cancellation flag which
conflicts with the Ctrl-c handler set up in the CLI's `main` block
for `tree-sitter highlight`. We can re-use the cancellation flag from
that block to avoid a panic that happens when using `tree-sitter
highlight -H <file>`
thread 'main' panicked at 'Error setting Ctrl-C handler: MultipleHandlers', cli/src/util.rs:31:6
This change also aligns the parameters that `highlight::ansi` and
`highlight::html` take.
2023-08-02 08:56:26 -05:00
Amaan Qureshi
acef7a3cdf
chore: add tests
2023-08-02 10:47:28 +01:00
Amaan Qureshi
b8fe5fe21b
fix: do not allow eof to advance states if the new state is the same state
2023-08-02 10:47:27 +01:00
Andrew Hlynskyi
a08c61235d
Fix, reference by value for Language as everywhere
2023-08-02 00:04:24 +03:00
Daumantas Kavolis
ec90c215ae
Add tests for bidirectional cursor
2023-08-02 00:02:33 +03:00
Daumantas Kavolis
1cb378b445
Add rust tests for lookahead iterator
2023-08-02 00:02:33 +03:00
Andrew Hlynskyi
19e665ef79
Add tests for TextProvider
2023-08-01 09:12:45 +03:00
Andrew Hlynskyi
a2f834d846
More error contexts + conv panics to errors with context
2023-07-30 21:16:45 +03:00
Amaan Qureshi
f4e788b28e
feat: warn when unused conflicts are present in a grammar
2023-07-28 00:23:28 -04:00
Amaan Qureshi
b8f7645ae2
Merge pull request #2434 from amaanq/test-update
...
fix: retain header and divider delimiter lengths when updating tests
2023-07-27 13:40:53 -04:00
Amaan Qureshi
bff5be9360
Merge pull request #2422 from amaanq/query-err-range-bug
...
fix: take the last range element by default if the query error isn't found
2023-07-27 13:23:45 -04:00
Amaan Qureshi
36c6c8aadf
Merge pull request #2423 from amaanq/nonzero-field-id
...
feat!: use `Option<NonZeroU16>` for TSFieldIds
2023-07-27 13:04:34 -04:00
Amaan Qureshi
0787c24a14
Merge pull request #2430 from amaanq/negative-assertions
...
Negative assertions
2023-07-27 12:44:12 -04:00
Amaan Qureshi
137483c7b9
fix: take the last range element by default if the query error isn't found
2023-07-27 12:34:47 -04:00
Amaan Qureshi
99366f3b5d
ci(sparc64): increase timeout time
2023-07-27 12:26:25 -04:00
Amaan Qureshi
192793a6ab
fix: avoid panic if input is empty
2023-07-27 03:37:02 -04:00
Amaan Qureshi
ee399e67d4
fix: retain header and divider delimiter lengths when updating tests
...
This helps to prevent visual bloat in diffs when updating tests where the delimiter is not 80 chars long
2023-07-27 03:31:46 -04:00
Amaan Qureshi
68b1006a3b
feat: add negative assertions, remove duplicate code
2023-07-25 00:27:34 -04:00
Amaan Qureshi
c9fd357c06
fix: avoid infinite loop bug
...
If the current tag is the last tag and the test fails, the j loop neverends. This prevents that by checking that in the j loop
2023-07-24 23:43:25 -04:00
Amaan Qureshi
a809274009
Merge pull request #2426 from amaanq/sort-tests
...
fix(tests): sort categories alphabetically
2023-07-24 23:21:57 -04:00
Amaan Qureshi
36deb567c8
fix(tests): sort categories alphabetically
2023-07-24 03:05:09 -04:00
Amaan Qureshi
75e1bcf70a
refactor!: rename proc_macro to avoid conflicts when building std with -Z build-std
2023-07-24 00:44:44 -04:00
Amaan Qureshi
c521e9c18e
chore: improve error message in some spots loading grammar.json
2023-07-24 00:44:44 -04:00
Amaan Qureshi
cf418a286e
chore: make implicit function declarations a compile-time error
2023-07-20 06:52:50 -04:00
Amaan Qureshi
9e99789e4c
Merge pull request #2407 from amaanq/bump-deps
...
Bump deps
2023-07-19 17:05:10 -04:00
Amaan Qureshi
fc1514d0cd
Merge pull request #2401 from amaanq/fix-inline-bug
...
fix: disallow inlining the first rule
2023-07-19 17:04:17 -04:00
Amaan Qureshi
5fba369c4a
fix: disallow inlining the first rule
...
This prevents a panic when indexing symbol_ids during the generation process
2023-07-19 16:14:58 -04:00
Samuel Moelius
d9d4116105
Add test_consecutive_zero_or_modifiers
2023-07-19 03:27:43 -04:00
Amaan Qureshi
56cedba4bf
chore: bump dependencies
2023-07-19 03:18:17 -04:00
Amaan Qureshi
0e53b66931
chore: remove useless use
2023-07-19 03:12:13 -04:00
Max Brunsfeld
8310fd423e
Update node unit test to reflect C grammar change
2023-07-18 17:58:19 -07:00
Max Brunsfeld
40f7b2ec97
Fix parsing of queries that start with repetitions followed by alternatives
2023-07-18 17:57:52 -07:00
Amaan Qureshi
e77405841e
refactor: make a subdirectory for the scratch dir depending on the machine's features
2023-07-18 20:14:21 -04:00
Amaan Qureshi
76f5f81aee
chore: update test
2023-07-18 19:29:40 -04:00
Amaan Qureshi
c436897662
test: bump start_time limit for sparc64
2023-07-18 19:07:51 -04:00
Amaan Qureshi
77a8c56558
ci: add big-endian & some obscure architectures
2023-07-18 15:44:20 -04:00
Andrew Hlynskyi
e1ea3328f4
Merge pull request #2394 from amaanq/hmmcipt2
...
Add more architectures to CICD
2023-07-16 17:23:26 +03:00
Andrew Hlynskyi
6ab282b578
cicd: add armv7l target #1366#issuecomment-1503176694
2023-07-16 16:07:13 +03:00
Andrew Hlynskyi
19ed2238cd
Fix arch mappings in install.js
2023-07-16 15:42:29 +03:00
Amaan Qureshi
975f3f4686
refactor!: use AtomicUsize for AllocationRecorder for portability
2023-07-16 05:14:11 -04:00
Amaan Qureshi
c23ec2c3ae
ci: add more architectures
2023-07-16 05:14:11 -04:00
Amaan Qureshi
2a277879ab
Merge pull request #2340 from tree-sitter/highlights-conformance
...
feat: add --check flag to `tree-sitter highlight`
2023-07-16 04:57:23 -04:00
Andrew Hlynskyi
0558f1e0bf
test: add retries for all timeout tests
2023-07-16 05:05:36 +03:00
Patrick Thomson
cb58bc593f
Add --check flag to tree-sitter highlight.
...
Recently I've been pulling a lot of grammars into GitHub's highlighting backend,
replacing legacy language support with tree-sitter highlighting queries.
Our backend systems have a standard set of highlight captures we expect, very
similar to the standard tagging captures we expect. Though end-user applications
are free to choose whatever tagging nomenclature they want, I think it's nice to
include a checking stage that will help us ensure that we know whether a capture
might be recognized or not. It will also help us figure out where we need to
expand our standard set of captures (see #1539 ).
2023-07-15 20:49:03 -04:00
Andrew Hlynskyi
0b0cc6c429
Fix rustc 1.71.0 warnings
2023-07-13 17:50:04 +03:00
Amin Yahyaabadi
04453f64af
fix: remove redundant get_compiler() call
2023-07-11 10:57:34 -07:00
Amin Yahyaabadi
5d83c8f3b8
fix: do not use -fPIC on Windows
2023-07-11 10:57:34 -07:00
Amin Yahyaabadi
76c5773d7c
fix: fix detection of the compiler on windows
2023-07-11 10:57:34 -07:00
Amaan Qureshi
9d669abac4
feat: add encoding flag and automatically check if a file might be utf-16
2023-07-10 16:43:35 -04:00