KermanX / js_to_oxc

Convert JS source to Oxc AST builder in Rust
https://kermanx.github.io/js_to_oxc/
30 stars 1 forks source link

Codegen optimization for `void 0` #2

Closed IWANABETHATGUY closed 2 months ago

IWANABETHATGUY commented 2 months ago

there is already a util function in AstBuilder so we could use builder.void_0 instead of create bunch of code.

https://kermanx.github.io/js_to_oxc/#N4IglgdgDgrgLiAXCAbgezAEwAQAYDcIANCFAE5oDmZAhgLYCyamApknGTCyTQM5wAhGGAA2rMkhC8WIgGYA6PnAD6AI2FiWEkryg0IkgMoAFAIIA5EAF8gA