-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Panic when parsing certain structures #10112
Comments
I'll fix it soon. Btw, are you going to swc's parser for lsp? |
swc_ecma_parser: - Don't panic for `try` statements without handler and finalizer. (denoland/deno#10112) swc_ecma_transforms_base: - Fix `typeof`s used with `externalHelpers: true`. (#1458, #1557)
@kdy1 yes, we use it for dependency analysis and for certain code completions. We are also going to use it to detect some symbols like |
@kitsonk Is this fixed? |
Don't know. Haven't had to the time to validate that the PR in swc was released and the Deno has updated to that release or later. |
We have as of 1.9.0, I made a list of issues that were fixed but didn't know how to repro this one to confirm. |
I just tried it off a recent version of main and it no longer occurs. |
In Deno main, the following code will cause a panic:
Something along the lines of:
I discovered the issue while using the Deno LSP and typing a
try {}
block in the editor, which is a common pattern when attempting to write out atry...catch
block in a function. While the syntax isn't invalid, swc shouldn't be panicing.cc/ @kdy1
The text was updated successfully, but these errors were encountered: