How can I rewrite this code for the moved SyntaxContext?
I'm upgrading the Qwik optimizer and this code no longer works because expr.span no longer has the SyntaxContext. However, the only other property is
expr.expr
expr.expr
which is a
Box<Expr>
Box<Expr>
.
How can I get at the syntax context to add the mark? Or is this the wrong approach and should I be doing one of https://swc.rs/docs/plugin/ecmascript/cheatsheet#deleting-node? I'm not sure how to apply that though, since it marks by making the name invalid and then removes, but here I need to retain what's marked.
SWC is an extensible Rust-based platform for the next generation of fast developer tools. It's used by tools like Next.js, Parcel, and Deno, as well as companies like Vercel, ByteDance, Tencent, Shopify, and more.