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

[WIP] handle SWC recoverable errors #7998

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Oct 16, 2020

Closes https://github.com/denoland/deno/issues/7246

Need to come up with some test before landing

@bartlomieju
Copy link
Member Author

After conversation with @kdy1 it turns out it's not really needed.

@bartlomieju bartlomieju deleted the refactor_swc_recoverable_errors branch October 19, 2020 12:43
@kdy1
Copy link

kdy1 commented Oct 19, 2020

Side note:

There are two kinds of errors.

The returned Err (from parser) is unrecoverable error, and it means the parser gave up parsing because it met something bad.
Errors from take_errors is recoverable (in the point of view of parser, not runtime), and such errors means the parser recovered from error.

In future, more errors will be recovered, mainly to mimic official typescript compiler.
Recovering errors allows running other validations on ast nodes, so the compiler can show more errors at once.

@bartlomieju
Copy link
Member Author

@kdy1 thanks for detailed explanation, I'll revisit the topic after SWC updates its recovery

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.

Handle recoverable errors from SWC
2 participants