Wilfred Hughes
974655aea8
Add a test file that shows how Python diffing is currently broken
2021-08-29 23:59:24 +07:00
Wilfred Hughes
d1354c7174
Use a single-column display when whole files are added or removed
2021-08-29 23:42:59 +07:00
Wilfred Hughes
d4121b6c0e
Clarify motivations in comment
2021-08-29 23:30:59 +07:00
Wilfred Hughes
6d270d8206
Add basic python parsing support
2021-08-29 22:33:30 +07:00
Wilfred Hughes
f2b6f32325
Add 'vendor/tree-sitter-python/' from commit 'd6210ceab11e8d812d4ab59c07c81458ec6e5184'
...
git-subtree-dir: vendor/tree-sitter-python
git-subtree-mainline: cc93976969
git-subtree-split: d6210ceab1
2021-08-29 22:22:12 +07:00
Wilfred Hughes
cc93976969
Handle SIGPIPE
...
Based on the sample code in
https://stackoverflow.com/a/65760807/509706
Closes #28
2021-08-29 16:50:05 +07:00
Wilfred Hughes
475eb804ab
Clariy known issues in README
2021-08-29 15:28:38 +07:00
Wilfred Hughes
c662181cd6
Make tree-sitter the default parser
2021-08-29 15:17:40 +07:00
Wilfred Hughes
1dfedc6534
Ensure we use codepoints when slicing strings to avoid crashes
...
Rust will panic if we try to slice on a boundary that isn't a char
boundary. Count unicode codepoints and slice to the relevant byte.
Added a test file that was crashing before due to the use of curly
quotes.
2021-08-29 15:10:01 +07:00
Wilfred Hughes
209932bfa4
Document usage with debug builds
2021-08-29 11:31:09 +07:00
Wilfred Hughes
15706936af
Allow debug printing of Style
2021-08-29 11:25:38 +07:00
Wilfred Hughes
1326152232
Tweak function name
2021-08-28 13:11:34 +07:00
Wilfred Hughes
32c3e9d0ca
Fix another crash when removing a whole file in git
2021-08-28 12:53:55 +07:00
Wilfred Hughes
7f021e147d
Improve handling of delimiters in all supported tree-sitter languages
2021-08-28 12:00:06 +07:00
Wilfred Hughes
bdf61a47a6
Simplify debug output of Syntax unless DFT_VERBOSE is set
2021-08-28 11:56:33 +07:00
Wilfred Hughes
52f019c9ba
Write a printing tree walker for displaying tree-sitter results
2021-08-28 11:39:40 +07:00
Wilfred Hughes
2eb2f8b67d
Add a --dump-ts debug option
2021-08-28 11:24:29 +07:00
Wilfred Hughes
72640815b1
Use clap to extract package version from cargo
2021-08-27 22:34:51 +07:00
Wilfred Hughes
1d0b1ad6b6
Add --dump-syntax for debugging the syntax tree
2021-08-27 22:32:48 +07:00
Wilfred Hughes
33251f9e1a
Factor out a Mode struct
2021-08-27 22:21:24 +07:00
Wilfred Hughes
35779dde2e
Remove unused --lang argument
2021-08-27 22:11:30 +07:00
Wilfred Hughes
aff0131ecb
Define a separate files.rs for reading and content checking
2021-08-27 22:08:32 +07:00
Wilfred Hughes
ce2d6dee54
Factor out argument parsing from main function
2021-08-27 22:05:24 +07:00
Wilfred Hughes
594473ab2d
Prefer static strings where possible
2021-08-27 21:50:56 +07:00
Wilfred Hughes
81ffcecc49
Clarify comment
2021-08-27 21:49:16 +07:00
Wilfred Hughes
309e4bc02c
Match delimiter tokens based on their content
2021-08-26 23:51:06 +07:00
Wilfred Hughes
bda2ce7d11
Improve string literals in tree-sitter parsers
2021-08-26 23:35:19 +07:00
Wilfred Hughes
a2de2eb241
Add a string literal to CSS sample files
2021-08-26 23:21:35 +07:00
Wilfred Hughes
81dae0a15e
Allow a per-language atom_nodes configuration for tree-sitter parsers
2021-08-26 23:18:00 +07:00
Wilfred Hughes
554ca8bb95
Factor out a config struct for tree sitter parsers
2021-08-26 23:02:33 +07:00
Wilfred Hughes
9eaefa3ec1
Treat JSON strings as indivisible
2021-08-26 22:42:48 +07:00
Wilfred Hughes
d5ce3e626f
Fix missing string pattern for JSON parser
2021-08-24 01:12:11 +07:00
Wilfred Hughes
763b9d2d17
Roll version
2021-08-24 01:07:07 +07:00
Wilfred Hughes
3123544bed
Use an explicit version for cc
2021-08-24 01:04:38 +07:00
Wilfred Hughes
efcb02c56c
Configure vendor/ for packaging
2021-08-24 01:02:32 +07:00
Wilfred Hughes
5d67ad3bea
Merge display sections in changelog
2021-08-24 00:23:32 +07:00
Wilfred Hughes
302e9e2558
Avoid the term 'dogfooding' for clarity
2021-08-24 00:22:33 +07:00
Wilfred Hughes
832bf5c2a5
Update file name
2021-08-24 00:21:14 +07:00
Wilfred Hughes
f17e0a5e0a
Support colour when using git with a pager
...
Closes #29
2021-08-24 00:20:34 +07:00
Wilfred Hughes
f55ca3bbcf
cargo fmt
2021-08-23 23:12:50 +07:00
Wilfred Hughes
fad0775315
Fix crash on renaming files
2021-08-22 23:51:41 +07:00
Wilfred Hughes
dff8eb0a65
Be more specific when called with the wrong number of arguments
2021-08-22 23:37:03 +07:00
Wilfred Hughes
4a48540975
Improve string handling for tree-sitter parsing with Rust
2021-08-22 12:10:40 +07:00
Wilfred Hughes
d3317b5f02
Skip end delimiters when parsing Clojure
2021-08-22 12:02:37 +07:00
Wilfred Hughes
58ae3996fc
rustfmt
2021-08-21 22:51:34 +07:00
Wilfred Hughes
43902c3fa9
Include language name in tree-sitter parsing mode
2021-08-21 22:36:44 +07:00
Wilfred Hughes
47a83d4717
Rename sitter to tree_sitter_parser for consistency
2021-08-21 22:15:34 +07:00
Wilfred Hughes
6a83368a4f
Split parse into regex_parser and line_parser
2021-08-21 22:13:04 +07:00
Wilfred Hughes
7e30b8cc04
Only rebuild C files if the relevant dir changes
2021-08-21 19:24:54 +07:00
Wilfred Hughes
80ba6f3749
Get tests running again
2021-08-21 19:24:28 +07:00