Description
Is your feature request related to a problem? Please describe.
The compiler is currently used as part of several language servers which attempt to provide a good intellisense for IDEs like VSCode. As a result, the content handed to the compiler is often incomplete or in an inconsistent state because the user is in the middle of typing something.
So if I hand in something like this:
<script>
import Comp from './comp.svelte'
</script>
<Co
I get an error.
Describe the solution you'd like
It should still throw an error but pass along something like a best guess of the parsed content. Mabye something like a partial output of parse
up to the error. If some part of the input (script, style, template) is consistent, it would be great to hand back the complete parser result of that part.
Describe alternatives you've considered
Don't use the compiler and somehow extract relevant info on our own - I would like to avoid that.
How important is this feature to you?
Important to harmonize LSPs in the long run and be able to integrate with the svelte compiler more deeply. But not that important that you should start working on it immediately. Also, if it's not just something like "oh we have that info already, we just need to append it" but more like "we have to rewrite a whole lot for that", it's ok to discuss first what other possibilities there are.