@graffiticode/basis 1.5.4 → 1.5.5
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/package.json +1 -1
- package/src/compiler.js +3 -3
package/package.json
CHANGED
package/src/compiler.js
CHANGED
|
@@ -366,7 +366,7 @@ export class Transformer extends Visitor {
|
|
|
366
366
|
if (pattern.tag === undefined || node.tag === undefined) {
|
|
367
367
|
return false;
|
|
368
368
|
}
|
|
369
|
-
const patternNid = this.internPattern(pattern);
|
|
369
|
+
const patternNid = this.internPattern(pattern);
|
|
370
370
|
if (patternNid === this.internPattern(node) ||
|
|
371
371
|
patternNid === this.internPattern(newNode('IDENT', ['_']))) {
|
|
372
372
|
return true;
|
|
@@ -485,7 +485,7 @@ export class Transformer extends Visitor {
|
|
|
485
485
|
// elements, given that they may have been reordered due to the
|
|
486
486
|
// nodes being visited asynchronously. The node ids are reversed,
|
|
487
487
|
// so we need to add prepend the current v0 to the list.
|
|
488
|
-
const val =
|
|
488
|
+
const val = node.elts.reduce((acc, elt) => [...acc, ndx[elt]], []);
|
|
489
489
|
resume(err, val);
|
|
490
490
|
}
|
|
491
491
|
});
|
|
@@ -560,7 +560,7 @@ export class Transformer extends Visitor {
|
|
|
560
560
|
// This is a little trickery to restore the original order of the
|
|
561
561
|
// fields, given that they may have been reordered due to the nodes
|
|
562
562
|
// being visited asynchronously.
|
|
563
|
-
const val =
|
|
563
|
+
const val = node.elts.reduce((acc, elt) => ({...acc, [ndx[elt].key]: ndx[elt].val}), {});
|
|
564
564
|
resume(err, val);
|
|
565
565
|
}
|
|
566
566
|
});
|