Commit Graph

15201 Commits (97dbc9b018223c4d9bae7d76d2e34640ade7cf25)
 

Author SHA1 Message Date
Grégoire Paris 082abf65d1 Document how to disable difftastic temporarily
It can be useful if you want to obtain a diff in the standard format and
copy paste it to github, for instance.
2024-05-07 08:48:20 +07:00
Wilfred Hughes 0ceb00093a Move notes to wiki 2024-05-07 08:42:45 +07:00
Wilfred Hughes 03d1f9bf26 Lint against .to_string() on String 2024-05-07 08:39:07 +07:00
Wilfred Hughes 9474635076 Prefer .to_owned() on &str 2024-05-07 08:32:30 +07:00
Wilfred Hughes 33542a47d5 Update CMake highlights for latest grammar 2024-05-07 08:29:34 +07:00
Nikolaj Sidorenco 5c85c505b5
fix: repeated attributes 2024-05-06 20:36:57 +07:00
Nikolaj Sidorenco c4d2c743e7
fix: ce expression vs application expression nested 2024-05-06 20:08:20 +07:00
dependabot[bot] 15c58119a9
build(deps-dev): bump eslint from 9.1.1 to 9.2.0 (#53) 2024-05-06 17:34:24 +07:00
dependabot[bot] 15c81bd1ba
build(deps): bump node-gyp-build from 4.8.0 to 4.8.1 (#52) 2024-05-06 17:32:52 +07:00
dependabot[bot] 6a7042c0e6
build(deps-dev): bump tree-sitter-cli from 0.22.5 to 0.22.6 (#51) 2024-05-06 17:32:22 +07:00
Nikolaj Sidorenco ccd13da847
fix: ce expression vs application expression 2024-05-05 16:11:37 +07:00
Nikolaj Sidorenco 830d01faa1
fix type decl scoping 2024-05-05 16:06:50 +07:00
Nikolaj Sidorenco c5fff9dc9d
clean up parser states for types 2024-05-04 15:04:50 +07:00
Nikolaj Sidorenco 6c7f980d42
feat: allow top-level expressions 2024-05-03 16:18:37 +07:00
Nikolaj Sidorenco 36eeeb4689
fix: prefix expression associativity 2024-05-02 23:05:15 +07:00
Nikolaj Sidorenco 1d8481b1f6
fix: for-loop vs do expression 2024-05-02 22:54:26 +07:00
Nikolaj Sidorenco 2af47eda2f
add queries 2024-05-01 19:36:28 +07:00
Nikolaj Sidorenco 05569e7e32
feat: improve error recovery
Allow the external scanner to always insert `indent` token, if the
grammar allows it.
If the external scanner every hits error recovery mode we start popping
`dedent` tokens off the stack. This create a expression block with no
expression inside allowing the grammar to more gracefully recover.
2024-05-01 17:05:20 +07:00
Nikolaj Sidorenco d819d6c35c
simplify scanner 2024-05-01 17:05:18 +07:00
dependabot[bot] 632077a079
build(deps-dev): bump eslint from 9.0.0 to 9.1.1 (#50) 2024-05-01 06:29:30 +07:00
dependabot[bot] 3c70aae132
Bump prebuildify from 6.0.0 to 6.0.1 (#49) 2024-05-01 06:26:46 +07:00
Nikolaj Sidorenco 53c2106398
improve error recovery 2024-04-30 19:58:43 +07:00
Nikolaj Sidorenco ed675061da
fix: while expression in seq expression 2024-04-29 22:58:14 +07:00
Nikolaj Sidorenco 8eac7b270e
add node field names 2024-04-29 19:25:22 +07:00
Nikolaj Sidorenco 8f7bf1aea3
simplify newline tokens 2024-04-29 19:08:16 +07:00
Nikolaj Sidorenco 1134e9f903
feat: anon record expressions 2024-04-29 17:39:57 +07:00
Nikolaj Sidorenco 4e2393286e
feat: add xml doc content node 2024-04-29 16:32:07 +07:00
Nikolaj Sidorenco 92cf19c347
fix: handle comments inside brackets 2024-04-29 16:15:41 +07:00
Wilfred Hughes e23b9fc224 Update CMake parser 2024-04-28 23:53:12 +07:00
Wilfred Hughes 9207220a02 Merge commit '20ffd6d3b4da1acdbf2d08204b2130a5b2f7c4b3' 2024-04-28 23:51:13 +07:00
Wilfred Hughes ecaee577b2 Update Elm parser 2024-04-28 23:50:29 +07:00
Wilfred Hughes 1dd7bbebe8 Merge commit '09dbf221d7491dc8d8839616b27c21b9c025c457' 2024-04-28 23:48:30 +07:00
Wilfred Hughes ae77a9cdf7 Document C++ parser change 2024-04-28 23:43:58 +07:00
Wilfred Hughes a9be2fefa7 Remove awkard CRLF file from vendored parser 2024-04-28 23:43:26 +07:00
Wilfred Hughes 4dc541b261 Merge commit '72fd00128f1c38319670cbf4bcedbba0dc849d96' 2024-04-28 23:42:03 +07:00
Wilfred Hughes b4ff51f6ac Update URL to Lua parser 2024-04-28 23:34:12 +07:00
Wilfred Hughes 27fb722ac7 Merge commit '1aafaff4d26dac5a36dd3495be33e1c20161d761' 2024-04-28 23:31:25 +07:00
Wilfred Hughes 5c40cd0282 Prefer _1 and _2 naming for test files
This is less to type, and it's now alphabetical, so e.g.
sample_files/*.kt just works as a test argument.
2024-04-28 23:28:06 +07:00
Wilfred Hughes cce7b2ee1b Merge commit 'b466ffb4d7ce0a833754429ad8d3a02e950ed74c' 2024-04-28 23:00:00 +07:00
Wilfred Hughes a5b2587eaa Merge commit 'eb68645662a3f7bf7fdd4bcb9531585f54c8570e' 2024-04-28 22:54:18 +07:00
Wilfred Hughes c2df185d49 Update Lua parser
Closes #701
2024-04-28 22:36:23 +07:00
Wilfred Hughes 50d90f6736 Add 'vendored_parsers/tree-sitter-lua/' from commit 'a24dab177e58c9c6832f96b9a73102a0cfbced4a'
git-subtree-dir: vendored_parsers/tree-sitter-lua
git-subtree-mainline: 9e44712cda
git-subtree-split: a24dab177e
2024-04-28 22:06:22 +07:00
Wilfred Hughes 9e44712cda Remove old lua grammar 2024-04-28 22:06:00 +07:00
Wilfred Hughes 2e016566ac Update CSS parser 2024-04-28 21:45:25 +07:00
Wilfred Hughes 688aaa83f8 Merge commit '02b4ee757654b7d54fe35352fd8e53a8a4385d42' 2024-04-28 17:32:23 +07:00
Wilfred Hughes 38f148df1f Don't flatten error nodes
As of b9d44ae65f (released in 0.38), difftastic prefers a textual
diff if any parse errors are present. As a result, users have to
opt-in to allowing parse errors. We can now preserve structure to
produce diffs that are more granular, at the slight risk of changes
being missed if parsers discard tokens.

Fixes #703
2024-04-28 17:28:34 +07:00
Wilfred Hughes 7f5c11c075 cargo fmt 2024-04-28 16:40:00 +07:00
Wilfred Hughes 8655a9464e Fix unwanted duplicate node in existing vec
Broken in previous commit. This is now only a few percentage points
performance win, but it's still a net improvement.
2024-04-28 16:35:40 +07:00
Wilfred Hughes d15d593708 Move to smallvec for seen vertices
This is a surprisingly large perf win. On my Thinkpad:

typing_before/after.ml:
before: 3.038B instructions
after:  2.870B instructions

slow_before/after.rs:
before: 2.381B instructions
after:  1.260B instructions (!)
2024-04-28 16:16:47 +07:00
Wilfred Hughes 26e1ae40ef Fix clippy lints 2024-04-28 16:09:54 +07:00