Amaan Qureshi
ef9cabd4b5
fix: update javascript tests and use cpp/javascript master for fixtures
2023-09-20 11:31:53 -04:00
Amaan Qureshi
e3a5863287
feat: add @injection.parent to inject an injection's node with the parent language
2023-08-21 01:08:17 -04:00
Andrew Hlynskyi
ffae7d6115
fix: mark helper Rust funcs that receive raw pointers as unsafe
2023-08-20 02:12:51 +03:00
Amaan Qureshi
ac579be788
fix(safety): mark functions that potentially deref a raw pointer as unsafe
2023-08-19 18:59:11 -04:00
Amaan Qureshi
45313e0dfb
feat: add injection.self to inject a node with itself
2023-08-18 18:37:57 -04:00
Amaan Qureshi
8eb92d1c64
feat: add an --apply-all-captures argument to highlight & test
2023-08-17 22:20:57 -04:00
Aleksei Bavshin
b27b4665ac
test: fix incorrect uses of i8 instead of c_char
...
Fixes build on aarch64, ppc64le and other platforms that have c_char
defined as u8.
2022-03-23 00:00:26 -07:00
Max Brunsfeld
0a46033391
Remove duplication of LossyUtf8 helper
2020-10-14 11:35:50 -07:00
Max Brunsfeld
e23f518915
highlight: add built-in support for carriage-return highlight
2020-01-28 14:47:21 -08:00
Max Brunsfeld
d06407aca2
Update highlight test for JSDoc grammar changes
2020-01-27 13:08:30 -08:00
Max Brunsfeld
3f109a3cb5
highlight: Fix logic for handling empty injections with no highlights
2020-01-27 12:32:37 -08:00
Max Brunsfeld
9dfd03e79a
highlight: Sipmlify injection API w/ new injection.combined property
2020-01-16 12:43:31 -08:00
Max Brunsfeld
6dbfbaed07
Start work on a system for testing syntax highlighting
2019-12-05 09:45:54 -08:00
Max Brunsfeld
084406148b
Tweak highlight name matching semantics, add doc comments
2019-10-17 12:03:34 -07:00
Max Brunsfeld
060e00463d
Implement include-children directive in injection queries
2019-10-14 17:38:42 -07:00
Max Brunsfeld
b3809274f0
Load highlight queries correctly in highlight unit tests
2019-10-14 17:24:16 -07:00
Max Brunsfeld
f4903578f8
Start reimplementing highlight crate with tree queries
2019-10-14 12:30:22 -07:00
Max Brunsfeld
62538ed410
highlight iterator: Return byte offset ranges instead of string slices
...
Refs #443
2019-09-04 17:29:31 -07:00
Max Brunsfeld
bd466febb4
highlight: Fix panic when cancelled before parsing a nested document
2019-07-16 14:34:24 -07:00
Max Brunsfeld
a1682eb81c
Handle injection-includes-children in highlighting property sheets
2019-06-11 16:59:33 -07:00
Max Brunsfeld
7bc7306afb
Add a unit test for local variable tracking in syntax highlighting
2019-05-10 14:38:43 -07:00
Max Brunsfeld
958ab27efb
Update JS highlighting unit test
2019-05-10 10:32:31 -07:00
Max Brunsfeld
d78ac581f3
Rename scope -> highlight in highlighting property sheets
...
We need to use the word `scope` for a different purpose: tracking local
scopes.
2019-05-09 09:42:40 -07:00
Max Brunsfeld
572f290ec0
Fix highlighting in the presence of node fields
2019-05-07 11:17:34 -07:00
Max Brunsfeld
8941dc1dda
Add cancellation flag parameter to highlight API
2019-03-18 09:52:02 -07:00
Max Brunsfeld
083e813218
Highlight: fix handling of root node injections like in ERB, EJS
2019-03-13 15:51:50 -07:00
Max Brunsfeld
98e4fd22ef
Start work on a C API for syntax highlighting
2019-03-08 13:13:02 -08:00
Max Brunsfeld
14b7af3436
highlight: Fix HTML rendering of empty lines
2019-02-22 11:48:29 -08:00
Max Brunsfeld
e239aa8229
highlight: don't include scope in ScopeEnd events
...
When there are embedded documents, multiple scopes can start or
end at the same position. Previously, there was no guarantee that
the ScopeEnd events would always occur in the reverse order of the
ScopeStart events. The easiest way to avoid exposing inconsistency
is to not surface the scopes being ended.
2019-02-20 16:45:51 -08:00
Max Brunsfeld
a46515b80f
Replace LanguageRegistry trait with a simple callback
2019-02-19 17:07:12 -08:00
Max Brunsfeld
e89b6b2402
Add a highlight subcommand
2019-02-19 12:32:03 -08:00