dillon1000/react

Commit

[rust] Data structures for semantic analysis

This is two things: 

* A toy semantic analysis that handles a tiny subset of JS, including labeled 
statements, labeled break/continue, and variable 
declaration/reference/reassignment. This only exists as a way to prove out the 
API for the more important bit: 

* More importantly, this defines a data model for the semantic analysis results 
and an API for building up the semantic analysis. 

Subsequent diffs will replace the first bit (toy analysis impl), while keeping 
the second part.
Browse files
Changed paths11 files
First-parent comparison
M compiler/forget/Cargo.lock ModifiedM compiler/forget/Cargo.toml ModifiedM compiler/forget/crates/forget_estree/src/visit.rs ModifiedM compiler/forget/crates/forget_estree_swc/src/lib.rs ModifiedM compiler/forget/crates/forget_fixtures/Cargo.toml ModifiedM compiler/forget/crates/forget_semantic_analysis/Cargo.toml ModifiedA compiler/forget/crates/forget_semantic_analysis/src/analyze.rs AddedM compiler/forget/crates/forget_semantic_analysis/src/lib.rs ModifiedA compiler/forget/crates/forget_semantic_analysis/tests/analysis_test.rs AddedA compiler/forget/crates/forget_semantic_analysis/tests/fixtures/labels.js AddedA compiler/forget/crates/forget_semantic_analysis/tests/snapshots/analysis_test__fixtures.snap Added
Patch

Files changed

Rendering syntax-highlighted changes…