dillon1000/react

Commit

[rust] Improved name resolution

This is the start of an improved semantic analysis pass, reusing the 
ScopeManager added earlier in the stack but with new analysis built using the 
new visitor trait. The logic is a rough port of 


https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/hermes-eslint/src/scope-manager/referencer/Referencer.js 

Lots of bits are still missing, i'm starting with the parts that Forget needs.
Browse files
Changed paths39 files
First-parent comparison
M compiler/forget/crates/forget_diagnostics/src/diagnostic.rs ModifiedM compiler/forget/crates/forget_estree/src/generated.rs ModifiedM compiler/forget/crates/forget_estree/src/generated_extensions.rs ModifiedM compiler/forget/crates/forget_estree/src/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_estree_codegen/src/ecmascript.json ModifiedM compiler/forget/crates/forget_hermes_parser/src/generated.rs ModifiedM compiler/forget/crates/forget_hermes_parser/src/generated_extension.rs ModifiedM compiler/forget/crates/forget_hermes_parser/tests/parser_test.rs ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@bug_object-pattern.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-member-expr-call.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-mixed-scope-and-local-variables-with-default.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-mixed-scope-declarations-and-locals.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error._todo.computed-lval-in-destructure.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-use-ref-added-to-dep-without-type-info.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-destructured-rest-element.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-aliased-not-added-to-dep-2.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-destruction-with-mutation.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-via-destructuring-with-mutation.js.snap ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedM compiler/forget/crates/forget_hermes_parser/tests/snapshots/[email protected] ModifiedA compiler/forget/crates/forget_semantic_analysis/src/analyzer.rs AddedM compiler/forget/crates/forget_semantic_analysis/src/lib.rs ModifiedR compiler/forget/crates/forget_semantic_analysis/src/analyze.rs →compiler/forget/crates/forget_semantic_analysis/src/scope_manager.rs RenamedA compiler/forget/crates/forget_semantic_analysis/src/scope_view.rs AddedM compiler/forget/crates/forget_semantic_analysis/tests/snapshots/analysis_test__fixtures.snap Modified
Patch

Files changed

Rendering syntax-highlighted changes…