mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
5f81b7bc303da1b674f476f3e5fea3dbc8be35b2
Removes all the `path: NodePath` values from various IR node types, replacing them with `loc: SourceLocation`. This type is an alias for babel's source location type plus a "generated" variant. The "OtherStatement" kind also used the `path` to print back the original AST (since we don't look into these); instead, we now capture the underlying `node` and emit that as-is during codegen. While I was doing this, i also fixed up the places where we had passed a null path; the vast majority have a clear place we can pull a location from. For example, `a ?? b` syntax creates some places/instructions for the `a != null`, but those can all point back to the `a` location.
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%