teptris 0.3.20 → 0.3.21

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/teptris.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teptris",
3
- "version": "0.3.20",
3
+ "version": "0.3.21",
4
4
  "description": "TOML for JavaScript/TypeScript at libteptris speed (WebAssembly, no fallback) - version tracks the engine ({engine}.{iteration}; npm semver is 3-part)",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -352,8 +352,13 @@ export function initApi(mod) {
352
352
  (x) => x !== null && typeof x === "object" &&
353
353
  !Array.isArray(x));
354
354
  if (aot) {
355
+ // element bodies are EXPLICIT (the element opens with the
356
+ // section op): nested tables promote to [path.sub]
357
+ // sections, matching the engine's canonical emitter - a
358
+ // true inline context (mixed-array elements) still passes
359
+ // true via arrayVal
355
360
  byte(0x0A);
356
- for (const el of v) { byte(8); members(el, true); byte(0x0C); }
361
+ for (const el of v) { byte(8); members(el, false); byte(0x0C); }
357
362
  byte(0x0C);
358
363
  } else {
359
364
  byte(0x09);