Difftastic uses the same parse tree for diffing and highlighting. This has a really nice side effect: you can spot parsing bugs from highlighting!
It's subtle, but difftastic shows parentheses/braces in bold. I noticed that < and > weren't bold, and fixed the parser :)
miniblog.
Related Posts
The literal 0xffu8 in Rust is pretty tricky to read without syntax highlighting. It looks like a plain hexadecimal value at first.
(Why not have syntax highlighting? Ironically I was debugging and improving VS Code's Rust highlighting.)
I've been iterating further on how Garden shows type errors.
For types in the standard library, I'm now showing "a String" but "an Int". I'm also doing basic syntax highlighting of the code excerpt.
What do you think?
It's confusing how 'REPL' refers to two different UIs:
A CLI like IPython or Julia, where things like multiline editing and syntax highlighting need careful implementation.
An editor protocol like SLIME or CIDER where multiline editing is a total non-issue.
