@kernlang/python 4.1.1-canary.228.1.41c150f2 → 4.1.1-canary.232.1.c7f7511c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,6 +41,7 @@
41
41
  * relative indent on the `return __k_tN` line; the wrapper prepends the
42
42
  * surrounding indent so the post-emit result nests correctly. */
43
43
  import type { IRNode, ValueIR } from '@kernlang/core';
44
+ type ArrayBindingStatus = 'fresh' | 'fresh-push' | 'stale' | 'captured';
44
45
  /** Slice 3e — caller-provided options for the Python body emitter.
45
46
  * Currently only `symbolMap`; future slices may add diagnostics, source-map
46
47
  * hooks, or per-handler config. Keep this open-ended so 3a/3b/3d/future
@@ -147,6 +148,17 @@ interface BodyEmitContext {
147
148
  regexScopes: Array<Map<string, Extract<ValueIR, {
148
149
  kind: 'regexLit';
149
150
  }> | null>>;
151
+ /** Nested-values slice-1 — per-scope RECORD-LITERAL binding table, index-
152
+ * aligned with `localScopes` (mirrors the TS emitter's `recordScopes`).
153
+ * `true` when a `let`/`expression-v1` bound a DIRECT object literal; the
154
+ * nested-record-field lowering fires ONLY for proven record idents —
155
+ * every other two-level chain keeps its base lowering. */
156
+ recordScopes: Array<Map<string, boolean>>;
157
+ recordArrayFieldScopes: Array<Map<string, Set<string> | null>>;
158
+ recordScalarArrayFieldScopes: Array<Map<string, Set<string> | null>>;
159
+ maybeRecordArrayFieldScopes: Array<Map<string, Set<string> | null>>;
160
+ arrayBindingScopes: Array<Map<string, ArrayBindingStatus>>;
161
+ scalarArrayBindingScopes: Array<Map<string, boolean>>;
150
162
  /** Per-scope `userName -> emittedName` map. Populated when an inner-block
151
163
  * `let` shadows an outer binding so TS block-scope (`let x=1; if(c){let x=2}
152
164
  * return x` → 1) survives Python's flat function-scope (would otherwise