Expand description
Reverse AST converter: react_compiler_ast (Babel format) → SWC AST.
This is the inverse of convert_ast.rs. It takes a react_compiler_ast::File
(which represents the compiler’s Babel-compatible output) and produces SWC AST
nodes suitable for code generation via swc_codegen.
Structs§
- SwcConversion
Result - Result of converting a Babel AST back to SWC, including extracted comments.
Functions§
- convert_
program_ to_ swc - Convert a
react_compiler_ast::Fileinto an SWCModuleand extracted comments. - convert_
program_ to_ swc_ with_ source - Convert a
react_compiler_ast::Fileinto an SWCModuleand extracted comments. Whensource_textis provided, type declarations can be extracted from the original source for perfect fidelity.