chore: construct analysis before module walk (#15108)

pull/15088/head
Rich Harris 8 months ago committed by GitHub
parent e9cc7dc9a1
commit 24b6fab58b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -243,7 +243,15 @@ export function analyze_module(ast, options) {
}
}
const analysis = { runes: true, tracing: false };
/** @type {Analysis} */
const analysis = {
module: { ast, scope, scopes },
name: options.filename,
accessors: false,
runes: true,
immutable: true,
tracing: false
};
walk(
/** @type {Node} */ (ast),
@ -256,14 +264,7 @@ export function analyze_module(ast, options) {
visitors
);
return {
module: { ast, scope, scopes },
name: options.filename,
accessors: false,
runes: true,
immutable: true,
tracing: analysis.tracing
};
return analysis;
}
/**

Loading…
Cancel
Save