Commit Graph

15327 Commits (ca9b7da43f079a27bccfd5457276fa51937c6cb0)
 

Author SHA1 Message Date
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
Steinar H. Gunderson 302570591f Make Stack be allocated on the arena.
This fixes another memory leak, and also removes the need for
refcounting the Stack objects and the Node objects they point to.
2024-04-28 15:46:23 +07:00
Steinar H. Gunderson 4fb1478817 Fix memory leak in neighbours array.
Vertex is allocated on the arena, so it is never dropped;
then it cannot contain a Vec allocated on the regular heap
without leaking memory. Replace the Vec with a slice allocated
on the arena, which seems to fix most of the leaks. (Some may
remain; I haven't checked fully.) It should also be slightly
more memory-efficient.

It's not clear that we actually need the RefCell instead of
just putting Option directly into the structure, but I've
let it stay.

This issue was probably introduced in a71d6118cf.
2024-04-28 15:46:23 +07:00
Wilfred Hughes 7353a7926f Try enabling ARM macos on CI 2024-04-28 15:23:45 +07:00
Wilfred Hughes cafff7f128 Pin mac build to macos-12 2024-04-28 15:16:04 +07:00
Wilfred Hughes d2cdb96e00 Expand man page and add to changelog 2024-04-28 15:07:23 +07:00
ObserverOfTime b466ffb4d7 chore: fix crlf line endings 2024-04-28 04:25:52 +07:00