@samitouri / QOS-React-2 / commits / f467774487

[babel-plugin][ez] Rename shouldCompile to shouldVisitNode

Lauren Tan committed Jun 20, 2023 at 12:30 UTC f467774487a820e4d0a22aeba244436488667280
1 file changed +3 -3
compiler/forget/packages/babel-plugin-react-forget/src/Entrypoint/Program.ts
+3 -3
@@ -132,7 +132,7 @@ export function compileProgram(
132 fn: NodePath<t.FunctionDeclaration>,
133 pass: CompilerPass
134 ): void {
135 - if (!shouldCompile(fn, pass)) {
135 + if (!shouldVisitNode(fn, pass)) {
136 return;
137 }
138
@@ -143,7 +143,7 @@ export function compileProgram(
143 fn: NodePath<t.ArrowFunctionExpression>,
144 pass: CompilerPass
145 ): void {
146 - if (!shouldCompile(fn, pass)) {
146 + if (!shouldVisitNode(fn, pass)) {
147 return;
148 }
149
@@ -317,7 +317,7 @@ export function compileProgram(
317 }
318 }
319
320 -function shouldCompile(
320 +function shouldVisitNode(
321 fn: NodePath<t.FunctionDeclaration | t.ArrowFunctionExpression>,
322 pass: CompilerPass
323 ): boolean {