3 ms·
I wrote diffr [0] for that purpose; it serves me well, especially if your team makes code with long lines. In my opinion, a simple approach that does NOT make
by mookid11 5y ago
I wrote diffr [0] for that purpose; it serves me well, especially if your team makes code with long lines.
In my opinion, a simple approach that does NOT make any parsing is more efficient (what about bugs in your parser? code with syntax errors? also, how fast would the parser be?)
[0]: https://github.com/mookid/diffr https://github.com/mookid/diffr
- feanaro 5y agoMany of your concerns could be alleviated by using Tree-Sitter. (https://tree-sitter.github.io/tree-sitter/ https://tree-sitter.github.io/tree-sitter/)
- pfdietz 5y agoTree-sitter is great, but I find it could do a better job with broken code. This is particularly important when parsing things like C or C++ where the preprocessor makes it likely that unpreprocessed code can't be parsed anyway.