mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
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>
This commit is contained in:
committed by
GitHub
parent
25a7ddad0a
commit
1e4ff952e6
@@ -489,4 +489,15 @@ mod test {
|
||||
let n = Number::from(123456f64);
|
||||
assert_eq!(format!("{}", n.format_decimal()), "123456");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn division_matches_high_precision_decimal() {
|
||||
let one = Number::from(1u64);
|
||||
let three = Number::from(3u64);
|
||||
let div = one.divide(&three).unwrap();
|
||||
let from_str: Number = "0.3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333"
|
||||
.parse()
|
||||
.unwrap();
|
||||
assert_eq!(div, from_str);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user