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

fix: enhance call to throw logic and handle return statements #140

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

michaelangeloio
Copy link
Owner

@michaelangeloio michaelangeloio commented Jan 25, 2024

This PR closes #114 .

Summary:

  • return statements weren't handled for calls to throws, this PR addresses that by updating the AST implementation
  • the logic for calls to throw is now greatly enhanced because we are now letting swc_ecma_ast handle the traversal of the expressions. For example, we were only handling call_expr before, but now all expressions should be handled: Arrow, CallExpr, Array, etc.

@michaelangeloio michaelangeloio changed the title fix: handle return statements and enhance call to throw logic fix: enhance call to throw logic and handle return statements Jan 25, 2024
@michaelangeloio michaelangeloio merged commit a1bfaf1 into main Jan 25, 2024
4 checks passed
@michaelangeloio michaelangeloio deleted the issue#114 branch January 25, 2024 17:07
@github-actions github-actions bot mentioned this pull request Jan 25, 2024
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.

Call To Throw isn't included in return statement
1 participant