(program, ctx)
| 353 | name: "solid-start:directives", |
| 354 | visitor: { |
| 355 | Program(program, ctx) { |
| 356 | const isModuleLevel = isDirectiveValid(ctx.opts, program.node.directives); |
| 357 | if (isModuleLevel) { |
| 358 | transformModuleLevelDirective(ctx.opts, program); |
| 359 | ctx.opts.valid = true; |
| 360 | } else { |
| 361 | // First, bubble up function declarations |
| 362 | program.traverse({ |
| 363 | FunctionDeclaration(child) { |
| 364 | // if (isFunctionDirectiveValid(ctx.opts, child)) { |
| 365 | bubbleFunctionDeclaration(child); |
| 366 | // } |
| 367 | }, |
| 368 | }); |
| 369 | program.scope.crawl(); |
| 370 | // Now we transform each function |
| 371 | program.traverse({ |
| 372 | ArrowFunctionExpression(path) { |
| 373 | transformFunction(ctx.opts, path, false); |
| 374 | }, |
| 375 | FunctionExpression(path) { |
| 376 | transformFunction(ctx.opts, path, false); |
| 377 | }, |
| 378 | }); |
| 379 | program.scope.crawl(); |
| 380 | |
| 381 | if (ctx.opts.count > 0) { |
| 382 | ctx.opts.valid = true; |
| 383 | removeUnusedVariables(program); |
| 384 | } |
| 385 | } |
| 386 | }, |
| 387 | }, |
| 388 | }; |
| 389 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…