efront 4.0.2 → 4.0.3
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/coms/compile/unstruct.js +12 -9
- package/coms/compile/unstruct_test.js +4 -1
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/coms/typescript-helpers/__assign.js +0 -18
- package/coms/typescript-helpers/__asyncDelegator.js +0 -12
- package/coms/typescript-helpers/__asyncGenerator.js +0 -18
- package/coms/typescript-helpers/__asyncValues.js +0 -14
- package/coms/typescript-helpers/__await.js +0 -8
- package/coms/typescript-helpers/__awaiter.js +0 -16
- package/coms/typescript-helpers/__classPrivateFieldGet.js +0 -12
- package/coms/typescript-helpers/__classPrivateFieldIn.js +0 -11
- package/coms/typescript-helpers/__classPrivateFieldSet.js +0 -13
- package/coms/typescript-helpers/__createBinding.js +0 -18
- package/coms/typescript-helpers/__decorate.js +0 -13
- package/coms/typescript-helpers/__esDecorate.js +0 -34
- package/coms/typescript-helpers/__exportStar.js +0 -10
- package/coms/typescript-helpers/__extends.js +0 -22
- package/coms/typescript-helpers/__generator.js +0 -34
- package/coms/typescript-helpers/__importDefault.js +0 -10
- package/coms/typescript-helpers/__importStar.js +0 -14
- package/coms/typescript-helpers/__makeTemplateObject.js +0 -11
- package/coms/typescript-helpers/__metadata.js +0 -10
- package/coms/typescript-helpers/__param.js +0 -10
- package/coms/typescript-helpers/__propKey.js +0 -10
- package/coms/typescript-helpers/__read.js +0 -23
- package/coms/typescript-helpers/__rest.js +0 -18
- package/coms/typescript-helpers/__runInitializers.js +0 -14
- package/coms/typescript-helpers/__setFunctionName.js +0 -11
- package/coms/typescript-helpers/__setModuleDefault.js +0 -12
- package/coms/typescript-helpers/__spreadArray.js +0 -16
- package/coms/typescript-helpers/__values.js +0 -18
package/coms/compile/unstruct.js
CHANGED
|
@@ -673,6 +673,7 @@ var ternary = function (body, getname, ret) {
|
|
|
673
673
|
eq.text = "=";
|
|
674
674
|
var q2 = explist2[explist2.length - 1];
|
|
675
675
|
an = q2.name;
|
|
676
|
+
asn = scanner2(an);
|
|
676
677
|
}
|
|
677
678
|
else an = n;
|
|
678
679
|
ass.push(equals[i], ...asn);
|
|
@@ -788,14 +789,9 @@ var _express = function (body, getname, ret) {
|
|
|
788
789
|
cache.push(b, p);
|
|
789
790
|
continue;
|
|
790
791
|
}
|
|
791
|
-
var
|
|
792
|
-
var n = scanner2(name);
|
|
793
|
-
q.name = name;
|
|
794
|
-
n.index = nameindex;
|
|
795
|
-
n.push(b.pop());
|
|
796
|
-
|
|
792
|
+
var pb = b.pop();
|
|
797
793
|
if (cache.length) nameindex = cache[cache.length - 2].index;
|
|
798
|
-
else if (isor)
|
|
794
|
+
else if (isor) q.push(...scanner2(`${getname(nameindex)}=`), ...b);
|
|
799
795
|
|
|
800
796
|
while (cache.length && cache[cache.length - 1] >= p) {
|
|
801
797
|
if (needcomma(q)) q.push({ type: STAMP, text: ',' });
|
|
@@ -805,10 +801,12 @@ var _express = function (body, getname, ret) {
|
|
|
805
801
|
if (p0 > powermap["="] || isawait) q.push(...scanner2(`${getname(t.index)}=`));
|
|
806
802
|
q.push.apply(q, t);
|
|
807
803
|
q.push.apply(q, b);
|
|
804
|
+
b = scanner2(`${getname(t.index)}`);
|
|
805
|
+
nameindex = t.index;
|
|
808
806
|
if (isawait) q.push(NEXT);
|
|
809
807
|
}
|
|
810
|
-
nameindex
|
|
811
|
-
|
|
808
|
+
var name = getname(nameindex);
|
|
809
|
+
q.name = name;
|
|
812
810
|
if (isor) {
|
|
813
811
|
if (o.text === '||') {
|
|
814
812
|
q.push(RE);
|
|
@@ -822,7 +820,12 @@ var _express = function (body, getname, ret) {
|
|
|
822
820
|
hasor = true;
|
|
823
821
|
nameindex = 0;
|
|
824
822
|
} else {
|
|
823
|
+
var n = scanner2(name);
|
|
824
|
+
n.index = nameindex;
|
|
825
|
+
n.push(pb);
|
|
826
|
+
nameindex++;
|
|
825
827
|
cache.push(n, p);
|
|
828
|
+
if (maxindex < nameindex) maxindex = nameindex;
|
|
826
829
|
}
|
|
827
830
|
}
|
|
828
831
|
else {
|
|
@@ -57,7 +57,7 @@ test("if(await a) await b", "_ = a; return [_, 1];\r\n if (!@) return [2, 0]; _
|
|
|
57
57
|
test("for(a in b)", "for (a in b)", true);
|
|
58
58
|
test("for(var a in b) a.push()", "for (var a in b) a.push()", true);
|
|
59
59
|
test("for(;;)", "return [0, 0]", true);
|
|
60
|
-
test("for(a = os[Symbol.iterator] || os[Symbol.asyncIterator] || Array.prototype[Symbol.iterator], a = a.call(os), b = a.next(); !b.done && (o = b.value, true); b = a.next())", "
|
|
60
|
+
test("for(a = os[Symbol.iterator] || os[Symbol.asyncIterator] || Array.prototype[Symbol.iterator], a = a.call(os), b = a.next(); !b.done && (o = b.value, true); b = a.next())", "_ = Symbol.iterator; _ = os[_]; if (_) return [1, 0]; _ = Symbol.asyncIterator; _ = os[_]; if (_) return [1, 0]; _ = Symbol.iterator; _ = Array.prototype[_];\r\n a = _; _ = a.call(os); a = _; _ = a.next(); b = _; return [1, 0];\r\n _ = !b.done; if (!_) return [1, 0]; _ = b.value; o = _; _ = (true);\r\n if (!_) return [1, 0]; _ = a.next(); b = _; return [-1, 0]", true);
|
|
61
61
|
test("for(a=0;a<1;a++)if(a==0)continue", `a = 0; return [1, 0];\r\n _ = a < 1; if (!_) return [2, 0]; _ = a == 0; if (_) return [1, 0]; return [1, 0];\r\n _ = a++; return [-1, 0]`, true);
|
|
62
62
|
test("for(a=0;a<10;a++) await a", "a = 0; return [1, 0];\r\n _ = a < 10; if (!_) return [2, 0]; _ = a; return [_, 1];\r\n _ = @; _ = a++; return [-1, 0]", true);
|
|
63
63
|
test("for(a=0;a<10;a++) await a, await b", "a = 0; return [1, 0];\r\n _ = a < 10; if (!_) return [3, 0]; _ = a; return [_, 1];\r\n _ = @; _ = b; return [_, 1];\r\n _ = @; _ = a++; return [-2, 0]", true);
|
|
@@ -85,6 +85,9 @@ test(`url += (/\\?/.test(url) ? "&" : "?") + datas;`, '_ = /\\?/.test(url); if (
|
|
|
85
85
|
test(`a = newname.querySelector("input,textarea").value = c.name.replace(/\\/$/, '')`, `_ = c.name.replace(/\\/$/, ''); newname.querySelector("input,textarea").value = _; a = _`, true);
|
|
86
86
|
test(`if (selected[f.url]) f.selected = true;`, `_ = f.url; _ = selected[_]; if (!_) return [1, 0]; f.selected = true; return [1, 0]`, true);
|
|
87
87
|
test(`location.protocol + parseURL(a.b).host `, `_ = a.b; _ = parseURL(_); location.protocol + _.host`, true);
|
|
88
|
+
test(`var base = location.protocol + "//" + parseURL(this.$scope.data.host).host + "/";`, `_ = location.protocol + "//", _0 = this.$scope.data.host; _0 = parseURL(_0); _ = _ + _0.host, _ = _ + "/"; base = _`, true);
|
|
89
|
+
test(`a=a+b*c+c*d`, `_ = b * c, _ = a + _, _0 = c * d, _ = _ + _0; a = _`, true);
|
|
90
|
+
test(`cc.name += "<f test></f>"`, `_ = cc.name + "<f test></f>"; cc.name = _`, true);
|
|
88
91
|
test("yield a", 'return [a, 3]', true);
|
|
89
92
|
test("throw a", 'throw a', true);
|
|
90
93
|
test("debugger", 'debugger', true);
|