dillon1000/react

Commit

Fix mutable range validation in PrintHIR

Fixes the mutable range validation in PrintHIR: when we checked the identifier 
scope's range we failed to allow end=start=0 cases which are also valid. 

While I was here, I created a separate assertion pass to check all ranges, that 
way we aren't relying on the printer to validate them. The pass is on for 
playground and tests, but disabled by default so it can't break internal apps.
Browse files
Changed paths9 files
First-parent comparison
M compiler/forget/apps/playground/components/Editor/index.tsx ModifiedM compiler/forget/packages/babel-plugin-react-forget/src/Entrypoint/Pipeline.ts ModifiedA compiler/forget/packages/babel-plugin-react-forget/src/HIR/AssertValidMutableRanges.ts AddedM compiler/forget/packages/babel-plugin-react-forget/src/HIR/Environment.ts ModifiedM compiler/forget/packages/babel-plugin-react-forget/src/HIR/PrintHIR.ts ModifiedM compiler/forget/packages/babel-plugin-react-forget/src/HIR/index.ts ModifiedA compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/repro-scope-missing-mutable-range.expect.md AddedA compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/repro-scope-missing-mutable-range.js AddedM compiler/forget/packages/snap/src/compiler-worker.ts Modified
Patch

Files changed

Rendering syntax-highlighted changes…