2 ms·
Difference in complexity of IDE's parser and Compiler's parser feels like order of magnitude IDE's you want to be very fast, so you use techniques like partial
by tester756 4y ago
Difference in complexity of IDE's parser and Compiler's parser feels like order of magnitude
IDE's you want to be very fast, so you use techniques like partial tree reparse and now when I think about it, then you also may need to update other places
like you use type that is defined somewhere below
and at first parse that type definition doesn't compile, so type usage above shows an error
and when you change type definition so it compiles, then if you only update that part of the tree, then previous would still scream about the error
it's really tricky
the theory behind how to deal with all of this problems seems to be easy
but when you actually get to the coding, then you have to be really thoughtful, careful and experienced in order to get the modeling of right
https://learn.microsoft.com/en-us/shows/seth-juarez/anders-hejlsberg-on-modern-compiler-construction https://learn.microsoft.com/en-us/shows/seth-juarez/anders-h...
________
I have some experience with simpler and more complex parsers
and for me no other type of software requires this much careful thought as parsers do if you want to address all those things like
correctness, speed and recovery on broken code fragments, good error messages, good code, maybe concurrency
- bbkane 4y agoYou would like https://rust-analyzer.github.io/blog/2020/07/20/three-architectures-for-responsive-ide.html https://rust-analyzer.github.io/blog/2020/07/20/three-archit...