mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
- 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>
20 lines
511 B
YAML
20 lines
511 B
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
cases:
|
|
- note: walk-loop-index-destructuring
|
|
data:
|
|
doc:
|
|
team:
|
|
ops:
|
|
members: ["alice"]
|
|
dev:
|
|
members: ["bob"]
|
|
modules:
|
|
- |
|
|
package test
|
|
|
|
result := [[section, role, members] |
|
|
walk(data.doc, [[section, role], {"members": members}])
|
|
]
|
|
query: data.test.result
|
|
want_result: [["team", "dev", ["bob"]], ["team", "ops", ["alice"]]] |