efront 4.7.3 → 4.8.1

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.
@@ -1,3 +1,33 @@
1
+ - zh-CN: 这个文件内的测试代码暂不支持
2
+ en: The test code in this file is currently not supported
3
+
4
+ - zh-CN: onback中阻止跳转的功能在新老版本的chrome上及其他不同浏览器上的表现均不一致,建议更换实现方式!
5
+ en: "The function of preventing redirection in onback performs differently on both new and old versions of Chrome, as well as on different browsers. It is recommended to change the implementation method!"
6
+
7
+ - zh-CN: 加载中..
8
+ en: Loading..
9
+
10
+ - zh-CN: 查看
11
+ en: check
12
+
13
+ - zh-CN: 单击生成
14
+ en: Click to generate
15
+
16
+ - zh-CN: 同意
17
+ en: agree
18
+
19
+ - zh-CN: 每行一个,不支持泛域名
20
+ en: "One per line, does not support generic domain names"
21
+
22
+ - zh-CN: 订单状态已更新
23
+ en: Order status updated
24
+
25
+ - zh-CN: 无法通过http服务完成审核
26
+ en: Unable to complete audit through HTTP service
27
+
28
+ - zh-CN: 下载
29
+ en: download
30
+
1
31
  - zh-CN: 以后不会再测试是否兼容vue了,也不准备增加对vue3及后续版本的支持,望知悉。
2
32
  en: "We will no longer test whether it is compatible with Vue in the future, and we are not planning to add support for Vue3 and subsequent versions. Please be informed."
3
33
 
@@ -164,7 +164,7 @@
164
164
  },
165
165
  fields: refilm`
166
166
  $账户/kid input
167
- *当前服务器的域名/domain/每行一个 text
167
+ *当前服务器的域名/domain/每行一个,不支持泛域名 text
168
168
  `,
169
169
  actions: {
170
170
  async 创建订单(actived) {
@@ -146,6 +146,12 @@
146
146
  async auditOrder(o) {
147
147
  await acme2.auditOrder(o, setauth);
148
148
  if (this.order === o) await this.openOrder(this.order);
149
+ if (this.order.status !== 'pendding') {
150
+ alert(i18n`订单状态已更新`);
151
+ }
152
+ else {
153
+ alert(i18n`无法通过http服务完成审核`, "warn");
154
+ }
149
155
  },
150
156
 
151
157
  async finalize(o) {
@@ -83,6 +83,7 @@ on("drop")(document, function (event) {
83
83
  event.preventDefault();
84
84
  });
85
85
  remove(document.body.childNodes);
86
+ zimoli.register('/wow/root');
86
87
  function main() {
87
88
  return layer;
88
89
  }
@@ -73,40 +73,12 @@ class File {
73
73
  p.abort();
74
74
  }
75
75
  }
76
- function main() {
76
+ function main(path) {
77
+ var loaded = false;
77
78
  var page = explorer$main();
78
- var backtime = 0;
79
- page.onback = function () {
80
- var $scope = this.$scope;
81
- if (!$scope.pathlist.length) {
82
- if (Date.now() - backtime < 2022) alert("已是根目录!");
83
- backtime = Date.now();
84
- return false;
85
- }
86
- if ($scope.pathlist) {
87
- var name = $scope.pathlist.pop();
88
- var base = data.getInstance("base").base;
89
- var p = $scope.pathlist.join("/").replace(/^\/+|\/+$/g, '');
90
- var bp = p ? base + p + '/' : base;
91
- p = p + '/';
92
- data.setInstance("pathlist", $scope.pathlist);
93
- name = name.replace(/^\/+|\/+$/g, '');
94
- $scope.selected = [{
95
- name,
96
- isfolder: true,
97
- where: p,
98
- host: base,
99
- url: bp + name + "/",
100
- fullpath: p + name + "/",
101
- type: 'folder'
102
- }];
103
- }
104
- $scope.open();
105
- return false;
106
- }
107
79
 
108
80
  extend(page.$scope, {
109
- pathlist: data.getInstance("pathlist"),
81
+ pathlist: path ? path.split('/') : [],
110
82
  read(from, start, size) {
111
83
  var authorization = data.getSource(data.getInstance("base").base);
112
84
  var xhr = cross("get", from.url, { authorization: authorization });
@@ -116,7 +88,11 @@ function main() {
116
88
  return xhr;
117
89
  },
118
90
  load(p) {
119
- data.setInstance("pathlist", this.pathlist);
91
+ if (loaded) {
92
+ location.href = "#/wow/root" + p;
93
+ return { then() { } };
94
+ }
95
+ loaded = true;
120
96
  var base = data.getInstance("base").base;
121
97
  var p = p.replace(/^\/+|\/+$/g, '');
122
98
  var bp = p ? base + p + "/" : base;
@@ -0,0 +1,15 @@
1
+ class Timer {
2
+ capture = Date.now();
3
+ value = 0;
4
+ pause() {
5
+ this.value += Date.now() - this.capture;
6
+ this.capture = null;
7
+ }
8
+ resume() {
9
+ this.capture = Date.now();
10
+ }
11
+ valueOf() {
12
+ return this.capture !== null ? this.value + Date.now() - this.capture : this.value;
13
+ }
14
+ }
15
+ module.exports = Timer;
@@ -46,9 +46,22 @@ var fixElement = function (o) {
46
46
  }
47
47
  o.attributes.forEach(a => {
48
48
  if (a.type === PIECE) {
49
- for (var p of parseProperty(a.text)) {
50
- push(p);
51
- }
49
+ a.text.split(/\s+/).forEach(text => {
50
+ var ps = parseProperty(text);
51
+ for (var cx = 0, dx = ps.length; cx < dx; cx++) {
52
+ if (needValue) break;
53
+ push(ps[cx]);
54
+ }
55
+ ps = ps.slice(cx);
56
+ if (!ps.length);
57
+ else if (ps.length === 1) push(ps[0]);
58
+ else {
59
+ ps.type = QUOTED;
60
+ ps.entry = '"';
61
+ ps.leave = '"';
62
+ push(ps);
63
+ }
64
+ })
52
65
  }
53
66
  else {
54
67
  push(a);
@@ -66,6 +79,7 @@ class Html extends Javascript {
66
79
  // inTag = false;
67
80
  scriptTags = [];
68
81
  ignoreTags = ["SCRIPT", "STYLE"];
82
+ type = ELEMENT;
69
83
  }
70
84
  var property = new Program;
71
85
  property.stamps = "=".split('');
@@ -93,6 +107,7 @@ Html.prototype.createScoped = function (code) {
93
107
  var vars = Object.create(null);
94
108
  var scriptNodes = [], styleNodes = [], tempNodes = [];
95
109
  var inScript = false;
110
+ var noTag = true;
96
111
  var run = function (c) {
97
112
  switch (c.type) {
98
113
  case ELEMENT:
@@ -100,7 +115,9 @@ Html.prototype.createScoped = function (code) {
100
115
  c.tagName = c.tag.toUpperCase();
101
116
  if (!/^(script|style|template)$/i.test(c.tagName)) {
102
117
  fixElement(c);
118
+ noTag = false;
103
119
  if (c.attributes) c.attributes.forEach(run);
120
+ noTag = true;
104
121
  if (!used[v]) used[v] = [];
105
122
  used[v].push(c);
106
123
  c.forEach(run);
@@ -142,7 +159,7 @@ Html.prototype.createScoped = function (code) {
142
159
  c.forEach(run);
143
160
  break;
144
161
  }
145
- if (!c.text) break;
162
+ if (noTag || !c.text) break;
146
163
  var t = strings.decode(c.text);
147
164
  var p = t.prev;
148
165
  var pp = p && p.prev;
@@ -154,7 +171,7 @@ Html.prototype.createScoped = function (code) {
154
171
  }
155
172
  break;
156
173
  case EXPRESS:
157
- if (inScript) return;
174
+ if (inScript || noTag) break;
158
175
  var t = c.text;
159
176
  t = parseExpress(t);
160
177
  var envs = createScoped(t).envs;
@@ -181,7 +198,7 @@ Html.prototype.createScoped = function (code) {
181
198
  scoped.scripts = scripts;
182
199
  scoped.styles = styles;
183
200
  var rootNodes = code.filter(a => !/^(script|style)$/i.test(a.tagName) && !(a.type & (SPACE | COMMENT)));
184
- if (rootNodes.length === 1) {
201
+ if (rootNodes.length === 1 && rootNodes[0].type === ELEMENT) {
185
202
  scoped.outerHTML = this.createString(rootNodes);
186
203
  var root = rootNodes[0];
187
204
  scoped.tagName = root.tagName;
@@ -2,8 +2,9 @@ var Html = require("./Html");
2
2
  var test = function (source, pick, value) {
3
3
  var h = new Html;
4
4
  var b = h.exec(source);
5
+ if (arguments.length === 2) source = pick;
5
6
  assert(h.createString(b), source);
6
- if (pick) {
7
+ if (arguments.length === 3) {
7
8
  assert(seek(b, pick), value);
8
9
  }
9
10
  };
@@ -12,3 +13,8 @@ test("<a>Let's Encrypt</a>");
12
13
  test("<style>{a-b:2}</style>");
13
14
  assert(scanner2("<a>Let's Encrypt</a>", Html).length, 1);
14
15
  test('<a href="${i18n``}">Let\'s Encrypt</a>');
16
+ test('加载中..<a class="loading"></a>');
17
+ test('<input ng-model=data.name />');
18
+ test('<input ng-model=data.name/>', '<input ng-model=data.name />');
19
+ test('<!--<input ng-model=data.name/>-->');
20
+ test('<div><!--<input ng-model=data.name/>--></div>');
@@ -81,25 +81,45 @@ Javascript.prototype.isProperty = function (o) {
81
81
  return false;
82
82
  };
83
83
  var setStrapExpress = function (mark_type, mark_text, prop, o, default_type) {
84
- var temp = o.queue;
85
- var type = o.type;
86
84
  var prev = o.prev;
87
85
  if (prev && prev.type === STRAP && /^(?:function|class|let|const|var)$/.test(prev.text)) {
88
86
  o.type = EXPRESS;
89
87
  return;
90
88
  }
91
- if (type === STRAP) while (temp) {
92
- if (temp.entry === '(') var pp = temp.prev;
93
- else if (temp.entry === "{") {
94
- if (!temp.prev || temp.prev.type !== SCOPED || temp.prev.entry !== '(') {
95
- temp = temp.queue;
96
- continue;
89
+ var type = o.type;
90
+ if (type !== STRAP) return;
91
+ var h = snapExpressHead(o);
92
+ var isfunc = h?.prev?.type === STAMP && h.prev.text === '=>';
93
+ var q = o.queue;
94
+ if (isfunc) var pp = h.prev.prev;
95
+ else while (q) {
96
+ h = snapExpressHead(q);
97
+ isfunc = h?.prev?.type === STAMP && h.prev.text === '=>';
98
+ if (isfunc) {
99
+ pp = h.prev.prev;
100
+ break;
101
+ }
102
+ if (q.entry === '(') {
103
+ var pp = q.prev;
104
+ }
105
+ else if (q.entry === "{") a: {
106
+ var p = q.prev;
107
+ if (p) {
108
+ if (p.type === STAMP && p.text === "=>") {
109
+ isfunc = true;
110
+ pp = p.prev;
111
+ break;
112
+ }
113
+ if (p.type === SCOPED && p.entry === "(") {
114
+ pp = p.prev;
115
+ break a;
116
+ }
97
117
  }
98
- temp = temp.prev;
99
- pp = temp.prev;
118
+ q = q.queue;
119
+ continue;
100
120
  }
101
121
  else {
102
- temp = temp.queue;
122
+ q = q.queue;
103
123
  continue;
104
124
  }
105
125
  if (pp && pp.isprop) {
@@ -112,27 +132,24 @@ var setStrapExpress = function (mark_type, mark_text, prop, o, default_type) {
112
132
  type = pp && pp.type === mark_type && pp.text === mark_text ? STRAP : EXPRESS;
113
133
  break;
114
134
  }
115
- var tn = temp.next;
116
- var isfunc = false;
117
- if (tn && tn.type === STAMP && tn.text === '=>') isfunc = true;
118
- if (!isfunc) {
119
- if (pp && pp.type === EXPRESS) pp = pp.prev;
120
- if (pp && pp.prev && pp.prev.type === STRAP && pp.prev.text === "function") {
121
- pp = pp.prev;
122
- isfunc = true;
123
- }
124
- else {
125
- isfunc = pp && pp.type === STRAP && pp.text === 'function';
126
- }
127
- }
128
- if (isfunc) {
129
- var chk = pp[prop];
130
- type = (chk && chk.type === mark_type && chk.text === mark_text) ? STRAP : EXPRESS;
135
+ var tn = q.next;
136
+ if (tn && tn.type === STAMP && tn.text === '=>') {
137
+ pp = q;
138
+ isfunc = true;
131
139
  break;
132
140
  }
133
- temp = temp.queue;
141
+ if (pp && pp.type === EXPRESS) pp = pp.prev;
142
+ if (pp && pp.type === STAMP && pp.text === "*") pp = pp.prev;
143
+ isfunc = pp && pp.type === STRAP && pp.text === 'function';
144
+ if (isfunc) break;
145
+
146
+ q = q.queue;
147
+ }
148
+ if (isfunc) {
149
+ var chk = pp[prop];
150
+ type = (chk && chk.type === mark_type && chk.text === mark_text) ? STRAP : EXPRESS;
134
151
  }
135
- if (!temp) type = default_type;
152
+ if (!q) type = default_type;
136
153
  o.type = type;
137
154
  }
138
155
  var setYieldExpress = setStrapExpress.bind(null, STAMP, "*", 'next');
@@ -338,7 +355,6 @@ Javascript.prototype.detectLabel = function (o) {
338
355
  }
339
356
  if (inExpress !== queue.inExpress) {
340
357
  o.isExpress = queue.inExpress = inExpress;
341
- if (o.text === 'async') console.log(o.isExpress, queue.isExpress, 'label');
342
358
  }
343
359
  }
344
360
 
@@ -347,6 +363,8 @@ Javascript.prototype.setType = function (o) {
347
363
  var last = o.prev;
348
364
  if (o.type === EXPRESS && /^\.[^\.]|^\.$/.test(o.text) && last && last.type === STAMP && last.text === "?") {
349
365
  last.type = EXPRESS;
366
+ var q = o.queue;
367
+ q.question--;
350
368
  return false;
351
369
  }
352
370
  if (last) {
@@ -15,7 +15,6 @@ const {
15
15
  number_reg,
16
16
  } = require("./common");
17
17
  var combine = require("../basic/combine");
18
-
19
18
  var sortRegExpSource = function (a, b) {
20
19
  if (a.indexOf(b) >= 0) return -1;
21
20
  if (b.indexOf(a) >= 0) return 1;
@@ -25,6 +24,7 @@ var createQuotedMap = function (entry) {
25
24
  var map = {};
26
25
  var end = {};
27
26
  entry.forEach(k => {
27
+ // if (k.length < 4) return;
28
28
  var [a, b] = k.slice(-2);
29
29
  if (a instanceof RegExp) a = stringsFromRegExp(a);
30
30
  if (b instanceof RegExp) b = stringsFromRegExp(b);
@@ -91,7 +91,7 @@ class Program {
91
91
  ["`", "`", /\\[\s\S]/, ["${", "}"]],
92
92
  ]
93
93
  tags = [
94
- [["<", "</"], /\/?>/, null, ["'", '"', "{", "}"], [/<!--/, /--!?>/]]
94
+ [["<", "</"], /\/?>/, null, ["'", '"', "<!--", "{", "}"]]
95
95
  ];
96
96
  scriptTags = [];
97
97
  ignoreTags = ["STYLE", "SCRIPT"];
@@ -149,6 +149,7 @@ class Program {
149
149
  var lasttype;
150
150
  var Code = this.Code;
151
151
  var queue = new Code();
152
+ queue.type = this.type;
152
153
  var origin = queue;
153
154
  var forceend_reg = this.forceend_reg;
154
155
  var program = this;
@@ -343,6 +344,7 @@ class Program {
343
344
  break loop;
344
345
  }
345
346
  var m = match[0];
347
+
346
348
  index = match.index + m.length;
347
349
  if (quote.tag && queue.inTag === 0) {
348
350
  if (openTag()) {
@@ -373,6 +375,7 @@ class Program {
373
375
  }
374
376
  break;
375
377
  }
378
+ if (!quote.entry) continue;
376
379
  a: if (quote.tag) {
377
380
  var mi = quote.tag.indexOf(m);
378
381
  if (mi < 0) {
@@ -405,6 +408,19 @@ class Program {
405
408
  continue loop;
406
409
  }
407
410
  if (m in this.quote_map) {
411
+ if (this.comment_entry.test(m)) {
412
+ push_piece();
413
+ var start = match.index;
414
+ var comment = this.quote_map[m];
415
+ comment.lastIndex = index;
416
+ do {
417
+ var match = comment.reg.exec(text);
418
+ } while (match && !comment.end.test(match[0]));
419
+ if (match) end = index = match.index + match[0].length;
420
+ m = text.slice(start, index);
421
+ save(COMMENT);
422
+ continue loop;
423
+ }
408
424
  if (queue.tag && !queue.inTag) continue;
409
425
  push_piece();
410
426
  var scope = [];
@@ -441,7 +457,14 @@ class Program {
441
457
  }
442
458
  }
443
459
  if (this.stamp_reg.test(m) && last) {
444
- if ((VALUE | EXPRESS) & last.type) break test;
460
+ if ((VALUE | EXPRESS) & last.type) {
461
+ if (queue.type !== ELEMENT) break test;
462
+ var lp = last.prev;
463
+ if (lp) {
464
+ if (lp.type === STAMP && lp.text !== ';') break test;
465
+ if (lp.type === STRAP && lp.transive) break test;
466
+ }
467
+ }
445
468
  if (last.type === QUOTED && !last.tag) break test;
446
469
  if (last.type === SCOPED && queue.inExpress) break test;
447
470
  if (lasttype === STAMP && m === last.text) break test;
@@ -685,8 +708,8 @@ class Program {
685
708
  }
686
709
  return this.compile(q);
687
710
  });
688
- if (q.tag) r = r.concat(q.tag.slice().sort(sortRegExpSource));
689
- r = r.concat(ts.map(this.compile)).join("|");
711
+ if (q.tag) r = r.concat(q.tag);
712
+ r = r.concat(ts.map(this.compile)).sort(sortRegExpSource).join("|");
690
713
  q.reg = new RegExp(r, 'g');
691
714
  q.end = this.createRegExp([q[1]]);
692
715
  if (q.length >= 4) {
@@ -1,4 +1,4 @@
1
- var { STAMP, getDeclared, VALUE, STRAP, SCOPED, QUOTED, snapSentenceHead, pickSentence, createString, getBodyWith } = require("./common");
1
+ var { STAMP, EXPRESS, STRAP, isHalfSentence, skipAssignment, skipFunction, getDeclared, VALUE, STRAP, SCOPED, QUOTED, snapSentenceHead, pickSentence, createString, getBodyWith, getFuncBody } = require("./common");
2
2
  var addAccessedStart = function (matched, namedMap) {
3
3
  var start = +namedMap["#1"];
4
4
  var body = getBodyWith(matched[0], 'arguments');
@@ -24,18 +24,120 @@ var getLoop = function (c, root) {
24
24
  c = h.queue;
25
25
  } while (c?.type === SCOPED && c !== root)
26
26
  return loop;
27
+ };
28
+ var hasRupt = function (a) {
29
+ if (a.type === STRAP && /^(await|yield)$/.test(a.text)) return true;
30
+ if (a.length) {
31
+ var a = a.first;
32
+ while (a) {
33
+ if (a.type === STRAP && /^(class|function|async)$/.test(a.text)) {
34
+ a = skipFunction(a);
35
+ }
36
+ else if (a.type === STAMP && a.text === '=>') {
37
+ a = skipAssignment(a);
38
+ }
39
+ else if (a.type === SCOPED) {
40
+ if (a.entry === "{") {
41
+ if (!a.isObject) {
42
+ if (hasRupt(a)) return true;
43
+ }
44
+ }
45
+ else {
46
+ if (hasRupt(a)) return true;
47
+ }
48
+ a = a.next;
49
+ }
50
+ else a = a.next;
51
+ }
52
+ }
53
+ return false;
54
+ };
55
+ var getNodePath = function (a, body) {
56
+ var q = a;
57
+ var qs = [];
58
+ while (q && q !== body) {
59
+ qs.push(q);
60
+ q = q.queue;
61
+ }
62
+ return qs.reverse();
63
+ };
64
+ var hasRuptBetween = function (a1, a2) {
65
+ var qp1 = getNodePath(a1);
66
+ var qp2 = getNodePath(a2);
67
+ var qc = [];
68
+ for (var cx = 0, dx = Math.min(qp1.length, qp2.length); cx < dx; cx++) {
69
+ var q1 = qp1[cx];
70
+ if (q1 !== qp2[cx]) break;
71
+ qc.push(q1);
72
+ }
73
+ if (!qc.length) return false;
74
+ var qce = qc.pop();
75
+ var q2 = qp2[cx];
76
+ for (var cx = qce.indexOf(q1), dx = qce.indexOf(q2) + 1 || qce.length; cx < dx; cx++) {
77
+ var q = qce[cx];
78
+ if (hasRupt(q)) return true;
79
+ }
80
+ return false;
81
+ }
82
+ var unMultiple = function (matched) {
83
+ var body = getFuncBody(matched[0]);
84
+ if (!body?.prev || body.checked & 0b10) return;
85
+ body.checked |= 0b10;
86
+ var { envs, used } = body.scoped;
87
+ var undec = [];
88
+ for (var k in envs) {
89
+ var w = [];
90
+ for (var o of used[k]) {
91
+ if (o.text !== k) continue;
92
+ if (o.equal && o.next === o.equal) {
93
+ w.push(o);
94
+ }
95
+ }
96
+ if (!w.length) continue;
97
+ for (var cx = 0, dx = w.length; cx < dx; cx++) {
98
+ var loop = getLoop(w[cx]);
99
+ if (loop && hasRupt(loop)) {
100
+ undec.push(k);
101
+ break;
102
+ }
103
+ if (cx > 0 && hasRuptBetween(w[cx - 1], w[cx])) {
104
+ undec.push(k)
105
+ break;
106
+ }
107
+ }
108
+ }
109
+ if (!undec.length) return;
110
+ var h = snapSentenceHead(body.prev);
111
+ matched = [];
112
+ var declared = null;
113
+ while (h && h !== body) {
114
+ if (h.kind) {
115
+ declared = h.text;
116
+ }
117
+ matched.push(h);
118
+ h = h.next;
119
+ }
120
+ if (!declared) {
121
+ declared = h.type & (STRAP | EXPRESS) && /^(module|exports|return)$/.test(h.tack);
122
+ if (!declared) return;
123
+ }
124
+
125
+ matched.suggest = `${createString(matched)}{\r\n // 不建议在可并行执行的函数中更改外部变量,以防并发调用时出现异常\r\n // 建议在可并行函数内声明如下变量,并修改用到这些变量的代码\r\n var ${undec.join(',')};\r\n }`;
126
+ return matched;
27
127
  }
28
128
  var suggest = {
29
129
  "while($2[$1++]!==$3)": "while($1<$2.length&&$2[$1++]!==$3)",
30
130
  "while($2[$1]!==$3)$1++": "while($1<$2.length&&$2[$1]!==$3)$1++",
31
131
  "for(var $1=#1,$2=arguments.length;$1<$2;$1++)": addAccessedStart,
32
132
  "for(var $1=#1;$1<arguments.length;$1++)": addAccessedStart,
133
+ "await": unMultiple,
134
+ "yield": unMultiple,
33
135
  "arguments"(matched) {
34
136
  var m = matched[0];
35
137
  var body = getBodyWith(m, 'arguments');
36
138
  var head = body.prev;
37
- if (!head?.length || body.checked) return;
38
- body.checked = true;
139
+ if (!head?.length || body.checked & 1) return;
140
+ body.checked |= 1;
39
141
  var { used, args } = body.scoped;
40
142
  if (!args?.length) return;
41
143
  var access_start = body.reststart ?? args?.length;
@@ -93,7 +195,7 @@ var suggest = {
93
195
  }
94
196
  matched.suggest = `${createString(matched.slice(0, matched.length - 1))}(){\r\n var[${createString(head)}]=arguments;\r\n // ${i18n`后续代码`}..\r\n }`;
95
197
  return matched;
96
- }
198
+ },
97
199
  };
98
200
 
99
201
  var regSuggest = function (c) {
@@ -26,6 +26,13 @@ async function c() {
26
26
  }
27
27
 
28
28
  // 正则表达式在步进函数中无法并发执行,是efront提取正则所致,目前要由用户手动处理
29
- async function *c() {
29
+ async function* c() {
30
30
  var reg = /a/g;
31
+ }
32
+
33
+ var a;
34
+ async function* c() {
35
+ a = 1;
36
+ await wait();
37
+ a = 2;
31
38
  }
@@ -100,6 +100,9 @@ var maplist = function (u) {
100
100
  }
101
101
  else if (enumtype & REFMOVE) m.wcount++;
102
102
  }
103
+ else {
104
+ if (o.equal) m.wcount++;
105
+ }
103
106
  }
104
107
  else if (enumtype & REFSTRC) {
105
108
  if (o.enumref && o.enumref !== m.enumref) m.wcount++, m.enumref = o.enumref;
@@ -172,6 +175,18 @@ function inCondition(o) {
172
175
  }
173
176
 
174
177
  function enumref(refitem, scoped) {
178
+ if (enumtype === REFMOVE) {
179
+ var c = 0;
180
+ for (var rk in refitem) {
181
+ c++;
182
+ var a = refitem[rk];
183
+ if (a.ccount > 0) return;
184
+ }
185
+ var a = refitem[""];
186
+ if (a && c > 1) {
187
+ if (a.wcount < a.length) return;
188
+ }
189
+ }
175
190
  for (var rk in refitem) {
176
191
  var os = refitem[rk];
177
192
  if (os.wcount !== 1 || os.length < 2) continue;