Commit Graph

5629 Commits (6824ba7d6b9c615860da8a8739c191248515ad71)
 

Author SHA1 Message Date
Wilfred Hughes 433b20ff8a Ensure that LHS and RHS syntax nodes have different IDs 2021-09-04 11:04:30 +07:00
Wilfred Hughes 86a330c44e Add debug logging and log stats on shortest path found 2021-09-04 10:46:51 +07:00
Wilfred Hughes 2cb1f02f62 Add todo for incorrect diffs when changing node depth 2021-08-30 21:20:24 +07:00
Wilfred Hughes 28d7b85e6b Simplify Python example file 2021-08-30 21:20:17 +07:00
Wilfred Hughes d00a20366f Init info in AST when offering a debug view 2021-08-30 19:30:21 +07:00
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
Torsten Schmits acafd11d9e fix infinite advancing on open quasiquote (#45) 2021-08-27 16:35:25 +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
Torsten Schmits f219f42b7e add missing target for a test case 2021-08-26 13:20:15 +07:00
Torsten Schmits 5a0c996b9c permit qualified varids for quasiquoters 2021-08-26 12:56:52 +07:00
Torsten Schmits bcd55577fd mention `clang++` in readme 2021-08-26 12:47:30 +07:00
Torsten Schmits c35610277f add nvim config snippet for installation from source 2021-08-25 23:00:12 +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