Files
regorus/src/compiler/destructuring_planner/mod.rs
Anand Krishnamoorthi 1e4ff952e6 feat!: Introduce structured destructuring plans for bindings (#485)
- add a dedicated `compiler/destructuring_planner` feature that precomputes binding plans for assignments, parameters, and `some in` expressions
- enrich `ScopeContext` with same-scope tracking, local scheduling hints, and module globals so the planner enforces := shadowing rules without blocking parent scopes
- wire the planner through compiler, hoist, interpreter, and engine paths while updating binding plan variants and adding query traversal helpers for dependency analysis
- document the new planner architecture and ship interpreter regressions that exercise nested destructuring, shadowing, and error reporting

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2025-10-21 15:57:49 -05:00

26 lines
944 B
Rust

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//! Destructuring and binding planner utilities.
//!
//! This module hierarchy reorganizes the binding planner into smaller components
//! so the compiler can evolve without ambiguity with FFI bindings. Submodules
//! will be filled in as code is migrated from the legacy `bindings` module.
pub mod assignment;
pub mod context;
pub mod destructuring;
pub mod error;
pub mod parameters;
pub mod plans;
pub mod some_in;
pub mod utils;
pub use assignment::create_assignment_binding_plan;
pub use context::{ScopingMode, VariableBindingContext};
pub use destructuring::create_destructuring_plan;
pub use error::{map_binding_error, BindingPlannerError, Result};
pub use parameters::{create_loop_index_binding_plan, create_parameter_binding_plan};
pub use plans::{AssignmentPlan, BindingPlan, DestructuringPlan, WildcardSide};
pub use some_in::create_some_in_binding_plan;