dillon1000/react
Commit
Browse files BuildHIR lowers FunctionDecl instead of rewriting to FuncExpr
We were modifying the Babel AST as a shortcut to lowering function declarations, instead we can explicitly lower them equivalently to a `let <id> = <function-expression>`.
Changed paths4 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.hoisted-function-declaration.expect.md ModifiedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/hoisting-computed-member-expression.expect.md ModifiedPatch
Files changed
Rendering syntax-highlighted changes…