efront 4.0.28 → 4.0.29
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/basic/#loader.js
CHANGED
|
@@ -163,7 +163,7 @@ var readFile = function (names, then) {
|
|
|
163
163
|
|
|
164
164
|
};
|
|
165
165
|
var createFunction = function (name, body, args, isAsync, isYield) {
|
|
166
|
-
return window.eval(`[${isAsync ? 'async ' : ''}function${isYield ? "*" : ""}/*${name}*/(${args || ''}){
|
|
166
|
+
return window.eval(`[${isAsync ? 'async ' : ''}function${isYield ? "*" : ""}/*${name}*/(${args || ''}){${body}\r\n}][0]`, name);
|
|
167
167
|
};
|
|
168
168
|
|
|
169
169
|
var FILE_NAME_REG = /^https?\:|\.(html?|css|asp|jsp|php)$/i;
|
|
@@ -613,7 +613,7 @@ var removeExport = function (c, i, code) {
|
|
|
613
613
|
var nn = n.next;
|
|
614
614
|
var d = nn.text;
|
|
615
615
|
if (used[d]) used[d].forEach(a => {
|
|
616
|
-
if (!a.kind) a.text = `exports
|
|
616
|
+
if (!a.kind) a.text = `exports.` + a.text;
|
|
617
617
|
});
|
|
618
618
|
delete used[d];
|
|
619
619
|
delete envs[d];
|
package/coms/compile/Program.js
CHANGED
|
@@ -535,7 +535,7 @@ class Program {
|
|
|
535
535
|
if (!this.classstrap_reg.test(m)) queue.inExpress = this.transive_reg.test(m);
|
|
536
536
|
else {
|
|
537
537
|
var last = queue.last;
|
|
538
|
-
if (!last)
|
|
538
|
+
if (!last);
|
|
539
539
|
else if (last.type === STAMP) {
|
|
540
540
|
queue.inExpress = !/^(;|\+\+|\-\-)$/.test(last.text);
|
|
541
541
|
}
|
package/coms/compile/common.js
CHANGED
|
@@ -344,11 +344,12 @@ var snapExpressHead = function (o) {
|
|
|
344
344
|
var snapExpressFoot = function (o) {
|
|
345
345
|
while (o && o.next) {
|
|
346
346
|
var n = null;
|
|
347
|
+
var isExpress = o.isExpress;
|
|
347
348
|
if (o.type & STRAP) {
|
|
348
349
|
n = o;
|
|
349
350
|
if (n.text === 'new') n = n.next;
|
|
350
351
|
if (n.text === 'function') {
|
|
351
|
-
while (n && n.type !== SCOPED || n.entry !== '{') n = n.next;
|
|
352
|
+
while (n && (n.type !== SCOPED || n.entry !== '{')) n = n.next;
|
|
352
353
|
}
|
|
353
354
|
else if (n.text === 'class') {
|
|
354
355
|
var n = o;
|
|
@@ -357,12 +358,13 @@ var snapExpressFoot = function (o) {
|
|
|
357
358
|
}
|
|
358
359
|
else break;
|
|
359
360
|
o = n;
|
|
361
|
+
n = o && o.next;
|
|
360
362
|
}
|
|
361
363
|
else if (o.type & (EXPRESS | QUOTED | VALUE | SCOPED)) {
|
|
362
364
|
n = o.next;
|
|
363
365
|
}
|
|
364
366
|
if (!n) break;
|
|
365
|
-
if (n.type === SCOPED && (o.entry !== '{' ||
|
|
367
|
+
if (n.type === SCOPED && (o.entry !== '{' || isExpress)
|
|
366
368
|
|| /\.$/.test(o.text) && !o.isdigit
|
|
367
369
|
|| n.type === EXPRESS && /^\??\.[^\.]/.test(n.text)
|
|
368
370
|
|| n.type === QUOTED && (n.length || /^\`/.test(n.text))
|