You're right about it being complex (my experience [1]), but such work is within scope for what's perhaps a central design decision for a library. Yes there'll be bugs, but it'll stabilize over time.
Just to be clear, I am NOT saying that Svelte needed to do this. But merely suggesting options for discussion and learning.
Just to be clear, I am NOT saying that Svelte needed to do this. But merely suggesting options for discussion and learning.
[1]: https://github.com/jeswin-unmaintained/isotropy-ast-analyzer... - Here's for instance, some code I wrote for analyzing a JS sort expression. You'd think it'd take just a few hours, until you get to it. Btw, it uses an AST analysis framework I wrote called chimpanzee - it has only one user though. :) https://github.com/jeswin/chimpanzee