@graffiticode/basis 1.5.11 → 1.5.12
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 +16 -0
package/package.json
CHANGED
package/src/compiler.js
CHANGED
|
@@ -848,6 +848,22 @@ export class Transformer extends Visitor {
|
|
|
848
848
|
});
|
|
849
849
|
});
|
|
850
850
|
}
|
|
851
|
+
SET(node, options, resume) {
|
|
852
|
+
this.visit(node.elts[0], options, (e0, v0) => {
|
|
853
|
+
this.visit(node.elts[1], options, (e1, v1) => {
|
|
854
|
+
this.visit(node.elts[2], options, (e2, v2) => {
|
|
855
|
+
const err = [...e0, ...e1];
|
|
856
|
+
assert(typeof v0 === "object", "Type Error: expected v0 to be an object.");
|
|
857
|
+
assert(typeof v1 === "string", "Type Error: expected v1 to be a string.");
|
|
858
|
+
const val = {
|
|
859
|
+
...v0,
|
|
860
|
+
[v1]: v2,
|
|
861
|
+
};
|
|
862
|
+
resume(err, val);
|
|
863
|
+
});
|
|
864
|
+
});
|
|
865
|
+
});
|
|
866
|
+
}
|
|
851
867
|
NTH(node, options, resume) {
|
|
852
868
|
this.visit(node.elts[0], options, (e0, v0) => {
|
|
853
869
|
this.visit(node.elts[1], options, (e1, v1) => {
|