Commit Graph

6693 Commits (f00b921de528b3455733598f8a796c5475a985ef)
 

Author SHA1 Message Date
Sebastian Dröge ebebfdf23e Fix typo in CHANGELOG.md 2021-10-19 08:54:25 +07:00
Wilfred Hughes e82a3f62f7 Clarify syntax highlighting features in 0.11 2021-10-18 23:10:09 +07:00
Wilfred Hughes ddd05cf738 Fix heading in changelog that should be h3 2021-10-18 23:07:44 +07:00
Wilfred Hughes dff1d3e7f9 Update screenshots and note repro commands 2021-10-18 23:04:27 +07:00
Wilfred Hughes 44b025fdc5 Roll version 2021-10-18 22:42:17 +07:00
Wilfred Hughes 6824ba7d6b Add release instructions to the manual 2021-10-18 22:41:56 +07:00
Wilfred Hughes 4287594cda Don't consider other paths when UnchangedNode is available
This substantially decreases the number of edges in our graphs,
especially when few nodes have changed. Diffing slow_before.rs with
slow_after.rs now takes half the time on my machine.

This makes diffing slightly greedier, so there may exist cases where
diffs are slightly worse. Comparing AXAB with AB is arguably nicer
as (+AX)AB rather than A(+XA)B. However, all the tests still pass,
and it's a huge perf win.

Closes #47
2021-10-18 22:23:44 +07:00
Wilfred Hughes 7f426070f6 Compute multiple MatchedPos from a slice of SingleLineSpan values 2021-10-17 17:24:36 +07:00
Wilfred Hughes 2640cbc101 Store only SingleLineSpan in MatchedPos
Positions almost always span a single line, as they just track
tokens. The only exception is multiline strings or comments.

Trying to match up all the lines between two tokens is far more
complex and doesn't provide much benefit. It was already the case that
we used the first line in the position in several code paths anyway.
2021-10-16 21:38:02 +07:00
Wilfred Hughes de110b3660 cargo fmt 2021-10-16 21:33:44 +07:00
Wilfred Hughes 10716461d3 Print the first few items of the route found when tracing 2021-10-16 09:31:10 +07:00
Gleb Pomykalov 1fedb2a117
wasm32-wasi SDK doesn't support exceptions. This commit disables exceptions when compile for wasm32-wasi. (#192) 2021-10-12 10:20:47 +07:00
Arthur Baars bb6a42e42b
Merge pull request #191 from aibaars/forwarded-args
Add forwarded parameters/arguments
2021-10-11 11:41:26 +07:00
Arthur Baars 95af674ff8 Merge remote-tracking branch 'origin/master' into forwarded-args 2021-10-11 11:14:31 +07:00
Arthur Baars d1171a5085
Merge pull request #190 from aibaars/end-less-methods
Endless methods
2021-10-09 06:36:20 +07:00
Arthur Baars 192ed481ec Add forward_argument to test cases 2021-10-09 06:31:47 +07:00
Arthur Baars 0efc23b7a8 Add forward parameter/argument 2021-10-08 13:32:11 +07:00
Arthur Baars 85ce8b4277 Add tests 2021-10-08 13:16:54 +07:00
Arthur Baars cdc7405ed2 Add end-less method definitions 2021-10-08 13:16:54 +07:00
Arthur Baars 6c5b0f3aa5 Formatting changes 2021-10-07 13:30:23 +07:00
Wilfred Hughes 484e373986 Link to tree-sitter-rust fork 2021-10-05 23:03:33 +07:00
Douglas Creager fdeb68ac8d Bump crate versions in Rust README 2021-10-04 13:07:24 +07:00
Douglas Creager affe3fcbbc
Merge pull request #207 from tree-sitter/loosen-ts-deps
Loosen Rust crate's tree-sitter dependency
2021-10-04 11:57:35 +07:00
Douglas Creager 66805de42f Loosen Rust crate's tree-sitter dependency
Nothing in the Rust binding depends on tree-sitter 0.20 in particular;
it works just fine if you haven't updated from 0.19 yet.  (Other
versions might work as well; these are the only two that I tested.)
2021-10-04 10:07:16 +07:00
Wilfred Hughes 74a5e7b151 Note that the manual is tracking the bleeding edge version 2021-10-03 16:45:20 +07:00
Wilfred Hughes febfbcea3e Make word diffs more granular
Fixes #39
2021-10-03 16:43:08 +07:00
Wilfred Hughes e9b5fe13ab Prefer ::default() for SyntaxInfo to keep clippy happy 2021-10-03 15:38:47 +07:00
Wilfred Hughes a77798a695 cargo fmt 2021-10-03 15:25:46 +07:00
Wilfred Hughes 3df7bb57e1 Add basic syntax highlighting for keywords and operators
Helps with #32
2021-10-03 15:23:27 +07:00
Wilfred Hughes c92007e5b3 Remove criterion
I've found the numbers pretty noisy on my laptop, and `perf stat` is a
nice way of testing full size files for performance.
2021-10-02 22:00:12 +07:00
Wilfred Hughes d355c3ceb0 Merge commit '4b0e4a3891337514126ec72c7af394c0ff2cf48c' 2021-10-02 12:17:06 +07:00
Wilfred Hughes 4b0e4a3891 Better handling of quoted defun forms 2021-10-02 12:14:40 +07:00
Wilfred Hughes 98ca8ea106 Ensure that single-item tree-sitter lists are difftastic lists
This is important when executing tree-sitter queries, as highlighting
queries tend to target leaf nodes. Flattening the tree loses that.

This may also lead to more accurate diffing logic in some examples,
but I haven't found any obvious cases.
2021-10-01 23:57:15 +07:00
Wilfred Hughes 2acb3b43b5 cargo fmt 2021-10-01 09:20:47 +07:00
cherryblossom000 ca3f48ce2e Support `cjs` and `mjs` extensions for JavaScript
Node.js uses the [`cjs` and `mjs` extensions][1] to indicate different module systems.

[1]: https://nodejs.org/api/packages.html#packages_determining_module_system
2021-10-01 00:35:00 +07:00
Wilfred Hughes 87d771219b Fix HighlightKind in tests 2021-09-30 21:41:18 +07:00
Wilfred Hughes 67916d260d Dim unchanged comments as a crude syntax highlighting technique 2021-09-30 00:07:37 +07:00
Wilfred Hughes b747cdcb01 Make bad position data more obvious (use purple) 2021-09-29 23:57:44 +07:00
Andrew Helwer 0c1e470822
Fix CRLF behavior mismatch during error recovery (#189)
* Added failing test

* Works

* Made control flow explicit
2021-09-28 14:17:59 +07:00
Wilfred Hughes d37c87a1a5 Update changelog for patch release 2021-09-28 09:50:02 +07:00
Wilfred Hughes 9409e4fb4e Clarify platform in changelog 2021-09-28 09:41:08 +07:00
Wilfred Hughes bdedcfce7d
Add missing word in readme 2021-09-27 20:30:57 +07:00
Wilfred Hughes 5e08a2562a Ensure version metadata is consistent 2021-09-27 00:17:52 +07:00
Wilfred Hughes a1dcfd45d6 Ignore target/ directory 2021-09-27 00:13:41 +07:00
Wilfred Hughes 69005f668d Mention mercurial in readme 2021-09-26 23:15:16 +07:00
Wilfred Hughes 08c68de229 Run `cargo upgrade` 2021-09-26 23:09:20 +07:00
Wilfred Hughes 62b030195e Upgrade to latest treesitter 2021-09-26 23:05:09 +07:00
Wilfred Hughes b0b1579f26 Correct delimiter positions
j counts from 0, so add the start value. Also ensure it is never equal
to i, or we get confused by delimiters where the open and close tokens
are the same (such as `|foo|` in Rust).
2021-09-26 21:40:10 +07:00
Wilfred Hughes 8a145e7b76 Improving profiling instructions
Provide full working examples and mention `perf`.
2021-09-26 21:32:49 +07:00
Wilfred Hughes ec37c5bef1 Add full Mercurial extdiff support 2021-09-26 21:23:22 +07:00