Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) error-forgiving parser #1177

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dummdidumm
Copy link
Member

@dummdidumm dummdidumm commented Sep 14, 2021

This adds some more robustness to svelte2tsx with regards to missing properties. This assumes that there's a Svelte parser mode which will continue parsing no matter what and ignore all errors along the way, resulting in a possibly very wrong but somewhat functional AST.
If such a parser mode was implemented in Svelte, it should return the first error it encountered, so that svelte2tsx can fall back to throwing this error if it encounters an error while parsing the broken AST.
I tested this and it resulted in better intellisense in situations where Svelte would bail out on the first parsing error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant