Module Wax_lang.Cond_specializeSource

Specialization of Wax conditional annotations (#[if(...)] / #[else]) against user-supplied variable bindings, the Wax-AST counterpart of Wax_wasm.Cond_specialize.module_.

Splice out and simplify every conditional annotation in a Wax module, according to Wax_wasm.Cond_specialize.eval. Returns the specialized module and the half-open byte ranges of the branches that were removed, for dropping their comments (see Wax_utils.Trivia.drop_in_ranges). With empty bindings this is the identity and no range is produced.