研究点东西

This commit is contained in:
shenjack 2024-03-17 17:33:17 +08:00
parent 63aa7252db
commit 606319217f
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -5633,28 +5633,56 @@
return g return g
}, },
parse_string(str) { parse_string(str) {
var s, r, q, p, current_group, n, m, l, k, j, i, h, g, f, e = null, var s, r, q, grouped, current_group, n, m, l, k, j, i, h, g, f, e = null,
d = t.E, d = t.E,
c = H.b([], d), c = H.b([], d)
b = C.b.cK(str, $.r_())
for (s = $.a(); s < b.length; ++s) { // static final RegExp regNewLine = new RegExp(r'\r?\n');
r = b[s] // List<String> names = str.split(regNewLine);
var names = C.b.cK(str, $.r_())
for (s = $.a(); s < names.length; ++s) {
r = names[s]
q = $.r0() q = $.r0()
r.toString r.toString
r = H.iG(r, q, " ", 0) r = H.iG(r, q, " ", 0)
q = $.nq() q = $.nq()
b[s] = H.iG(r, q, "", 0) names[s] = H.iG(r, q, "", 0)
} }
for (; J.Y(C.a.gbl(b), "");) {
b.pop() // while (names.last == '') {
if (b.length === 0) return H.b([], d) // names.removeLast();
// if (names.isEmpty) {
// return [];
// }
// }
// for (; J.Y(C.a.gbl(names), "");) {
// names.pop()
// if (names.length === 0) return H.b([], d)
// }
for (; J.Y(C.a.gbl(names), "");) {
names.pop() // 移除列表names的最后一个元素
// 如果列表names为空
if (names.length === 0) {
return H.b([], d)
} // 返回一个空列表
} }
p = C.a.w(b, "") && true
grouped = C.a.w(names, "") && true
/*
bool grouped = false;
if (names.contains('')) {
grouped = true;
}*/
d = t.t d = t.t
current_group = H.b([], d) current_group = H.b([], d)
for (s = $.a(), r = t.V, q = !p, n = e; s < b.length; ++s) { for (s = $.a(), r = t.V, q = !grouped, n = e; s < names.length; ++s) {
m = b[s] m = names[s]
if (m === "") { if (m === "") {
if (current_group.length !== 0) c.push(current_group) if (current_group.length !== 0) c.push(current_group)
current_group = H.b([], d) current_group = H.b([], d)
@ -5697,10 +5725,10 @@
else current_group.push(H.b([h[$.a()], h[$.i()], j], r)) else current_group.push(H.b([h[$.a()], h[$.i()], j], r))
} else if (C.b.bA(m, " ")) current_group.push(H.b([C.b.ay(m, $.i()), n, j], r)) } else if (C.b.bA(m, " ")) current_group.push(H.b([C.b.ay(m, $.i()), n, j], r))
else { else {
if (s + $.i() < b.length) { if (s + $.i() < names.length) {
l = $.n5() l = $.n5()
if (l == null) H.G(H.R(l)) if (l == null) H.G(H.R(l))
l = !H.iF(m, l, 0) && J.m1(b[s + $.i()], " ") l = !H.iF(m, l, 0) && J.m1(names[s + $.i()], " ")
} else l = false } else l = false
if (l) n = m if (l) n = m
else { else {