* @param {AST.Script | null} script * @param {ScopeRoot} root * @param {boolean} allow_reactive_declarations * @param {Scope | null} parent * @returns {Js}
(script, root, allow_reactive_declarations, parent)
| 215 | * @returns {Js} |
| 216 | */ |
| 217 | function js(script, root, allow_reactive_declarations, parent) { |
| 218 | /** @type {ESTree.Program} */ |
| 219 | const ast = script?.content ?? { |
| 220 | type: 'Program', |
| 221 | sourceType: 'module', |
| 222 | start: -1, |
| 223 | end: -1, |
| 224 | body: [] |
| 225 | }; |
| 226 | |
| 227 | const { scope, scopes, has_await } = create_scopes( |
| 228 | ast, |
| 229 | root, |
| 230 | allow_reactive_declarations, |
| 231 | parent |
| 232 | ); |
| 233 | |
| 234 | return { ast, scope, scopes, has_await }; |
| 235 | } |
| 236 | |
| 237 | /** |
| 238 | * @param {string} filename |
no test coverage detected