@kernlang/python 4.0.0 → 4.0.1-canary.224.1.1a92ac0a
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.
- package/dist/codegen-body-python.d.ts +13 -0
- package/dist/codegen-body-python.js +1140 -145
- package/dist/codegen-body-python.js.map +1 -1
- package/dist/core/emit-models.js +5 -1
- package/dist/core/emit-models.js.map +1 -1
- package/dist/core/expr/helpers.d.ts +45 -0
- package/dist/core/expr/helpers.js +509 -5
- package/dist/core/expr/helpers.js.map +1 -1
- package/dist/core/expr/index.d.ts +1 -1
- package/dist/core/expr/index.js +137 -9
- package/dist/core/expr/index.js.map +1 -1
- package/dist/core/expr/list-ops.d.ts +10 -1
- package/dist/core/expr/list-ops.js +5 -9
- package/dist/core/expr/list-ops.js.map +1 -1
- package/dist/generators/core.js +5 -1
- package/dist/generators/core.js.map +1 -1
- package/dist/generators/ground.d.ts +13 -0
- package/dist/generators/ground.js +117 -12
- package/dist/generators/ground.js.map +1 -1
- package/package.json +2 -2
|
@@ -195,6 +195,19 @@ interface BodyEmitContext {
|
|
|
195
195
|
* `gensymCounter` so closure names stay stable/independent of other
|
|
196
196
|
* gensym usage. */
|
|
197
197
|
closureSeq: number;
|
|
198
|
+
/** S5 review fix — CPython REJECTS the walrus operator anywhere inside a
|
|
199
|
+
* comprehension/generator ITERABLE expression ("assignment expression
|
|
200
|
+
* cannot be used in a comprehension iterable expression", a symtable check
|
|
201
|
+
* that NO amount of nesting — parens, calls, lambdas, list displays —
|
|
202
|
+
* escapes). Every site that interpolates an emitted expression into a
|
|
203
|
+
* `for … in <here>` head sets this flag (via `withWalrusBan`) while
|
|
204
|
+
* emitting that operand; every walrus-producing lowering (`&&`/`||`,
|
|
205
|
+
* impure-left `??`, `typeof`) checks it and emits the walrus-free
|
|
206
|
+
* lambda-parameter form instead: `(lambda __k_N: (<body using __k_N>))(L)`
|
|
207
|
+
* — same single-eval of L, same lazy unselected branch (the conditional
|
|
208
|
+
* lives in the lambda body), one extra closure allocation only in these
|
|
209
|
+
* rare positions. */
|
|
210
|
+
banWalrus?: boolean;
|
|
198
211
|
/** Slice-2 loop-variable pinning. Each entry is the INDEX into `localScopes`
|
|
199
212
|
* of a scope that is a loop BODY (an `each`/`for`/`while` body). A captured
|
|
200
213
|
* name is pinned (JS per-iteration capture → Python default arg) IFF its
|