Hacker News new | ask | show | jobs
by ratorx 1267 days ago
How does your custom parser implementation compares to something like Treesitter (which AFAIK is designed around the same goals of incremental parsing)?

Is the extra flexibility of having everything be custom worth it?

1 comments

I've not used Treesitter so I couldn't say.

The incremental parsing is definitely worth it. Not having to wait for a full parse of the entire file on each edit is a game changer.

Oh, I was more asking about the (potential) advantage of not using Treesitter.

I’ve used the incremental parsing from Treesitter in Neovim (though not on any absolutely massive codebases) and found it to be great (when it worked). But I suspect this is immaturity in the ecosystem (one of the Neovim implementation, the parser definition or Treesitter itself).

As I say, I haven't used Treesitter so I can't say, but in my experience most options do not perform well on huge codebases (> 5 million loc)