mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
fix(napi/transform): fix wrong isolated declarations emit
This commit is contained in:
parent
69dc6c9cb1
commit
4d0b40ad10
1 changed files with 2 additions and 3 deletions
|
|
@ -23,7 +23,6 @@ pub fn isolated_declaration(filename: String, source_text: String) -> IsolatedDe
|
|||
let allocator = Allocator::default();
|
||||
let ctx = TransformContext::new(&allocator, &filename, &source_text, source_type, None);
|
||||
let transformed_ret = build_declarations(&ctx);
|
||||
|
||||
IsolatedDeclarationsResult {
|
||||
source_text: transformed_ret.source_text,
|
||||
errors: ctx.take_and_render_reports(),
|
||||
|
|
@ -31,7 +30,7 @@ pub fn isolated_declaration(filename: String, source_text: String) -> IsolatedDe
|
|||
}
|
||||
|
||||
pub(crate) fn build_declarations(ctx: &TransformContext<'_>) -> CodegenReturn {
|
||||
let transformed_ret = IsolatedDeclarations::new(ctx.allocator).build(&ctx.program_mut());
|
||||
let transformed_ret = IsolatedDeclarations::new(ctx.allocator).build(&ctx.program());
|
||||
ctx.add_diagnostics(transformed_ret.errors);
|
||||
ctx.codegen::<false>().build(&ctx.program())
|
||||
ctx.codegen::<false>().build(&transformed_ret.program)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue