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

consider removing EmptyStatement node from the AST #5

Open
MichaelBuhler opened this issue Jul 1, 2023 · 1 comment
Open

consider removing EmptyStatement node from the AST #5

MichaelBuhler opened this issue Jul 1, 2023 · 1 comment

Comments

@MichaelBuhler
Copy link
Owner

e.g. We could use Babel Traverse to pre-process the AST prior to code generation. An EmptyStatement visitor could remove such nodes from the AST.

concern: I wonder if for (;;) {} would produce EmptyStatement nodes?

@MichaelBuhler
Copy link
Owner Author

the previous concern about for (;;) {} seems to be no problem at all.

as for removing EmptyStatement nodes, I am thinking that there may be a variety of similar optimizations that could be enabled/disabled via a transpiler flag.

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

No branches or pull requests

1 participant