Turns out that writing a C compiler is non-trivial.
miniblog.
Related Posts
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.
ASTs typically discard comments, and that's usually what you want.
The only time (AFAICS) that preserving comments is useful is for writing a code formatter.
Could you write a formatter in terms of a list of lexemes? A CST is a non-trivial bit of code for one use case.
Today I learnt that A* doesn't work for an arbitrary non-planar graph, you need additional structure:
https://stackoverflow.com/q/26568552/509706
This matches my experience with difftastic so far. The graph is non-planar and my best heuristic only matches Dijkstra perf in typical cases.