@famibee/skynovel 1.64.11 → 1.64.13
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/dist/CmnTween.js +118 -125
- package/dist/CmnTween.js.map +1 -1
- package/dist/EventMng.js +91 -92
- package/dist/EventMng.js.map +1 -1
- package/dist/GrpLayer.js +16 -11
- package/dist/GrpLayer.js.map +1 -1
- package/dist/LayerMng.js +92 -93
- package/dist/LayerMng.js.map +1 -1
- package/dist/Main.js.map +1 -1
- package/dist/PropParser.js +60 -58
- package/dist/PropParser.js.map +1 -1
- package/dist/Reading.js +5 -4
- package/dist/Reading.js.map +1 -1
- package/dist/ScriptIterator.js +97 -97
- package/dist/ScriptIterator.js.map +1 -1
- package/dist/SndBuf.js +37 -35
- package/dist/SndBuf.js.map +1 -1
- package/dist/Variable.js +89 -94
- package/dist/Variable.js.map +1 -1
- package/dist/sn/CmnTween.d.ts +4 -15
- package/dist/sn/CmnTween.d.ts.map +1 -1
- package/dist/sn/EventMng.d.ts.map +1 -1
- package/dist/sn/GrpLayer.d.ts +1 -1
- package/dist/sn/GrpLayer.d.ts.map +1 -1
- package/dist/sn/Layer.d.ts +1 -1
- package/dist/sn/Layer.d.ts.map +1 -1
- package/dist/sn/LayerMng.d.ts.map +1 -1
- package/dist/sn/Main.d.ts.map +1 -1
- package/dist/sn/PropParser.d.ts +7 -4
- package/dist/sn/PropParser.d.ts.map +1 -1
- package/dist/sn/Reading.d.ts +1 -1
- package/dist/sn/Reading.d.ts.map +1 -1
- package/dist/sn/ScriptIterator.d.ts.map +1 -1
- package/dist/sn/SndBuf.d.ts.map +1 -1
- package/dist/sn/Variable.d.ts.map +1 -1
- package/dist/web2.js +3 -3
- package/dist/web2.js.map +1 -1
- package/dist_app/CmnTween.js +118 -125
- package/dist_app/CmnTween.js.map +1 -1
- package/dist_app/EventMng.js +244 -245
- package/dist_app/EventMng.js.map +1 -1
- package/dist_app/GrpLayer.js +16 -11
- package/dist_app/GrpLayer.js.map +1 -1
- package/dist_app/LayerMng.js +59 -60
- package/dist_app/LayerMng.js.map +1 -1
- package/dist_app/Main.js.map +1 -1
- package/dist_app/PropParser.js +37 -35
- package/dist_app/PropParser.js.map +1 -1
- package/dist_app/Reading.js +5 -4
- package/dist_app/Reading.js.map +1 -1
- package/dist_app/ScriptIterator.js +151 -151
- package/dist_app/ScriptIterator.js.map +1 -1
- package/dist_app/SndBuf.js +37 -35
- package/dist_app/SndBuf.js.map +1 -1
- package/dist_app/Variable.js +89 -94
- package/dist_app/Variable.js.map +1 -1
- package/dist_app/app2.js +3 -3
- package/dist_app/app2.js.map +1 -1
- package/dist_app/sn/CmnTween.d.ts +4 -15
- package/dist_app/sn/CmnTween.d.ts.map +1 -1
- package/dist_app/sn/EventMng.d.ts.map +1 -1
- package/dist_app/sn/GrpLayer.d.ts +1 -1
- package/dist_app/sn/GrpLayer.d.ts.map +1 -1
- package/dist_app/sn/Layer.d.ts +1 -1
- package/dist_app/sn/Layer.d.ts.map +1 -1
- package/dist_app/sn/LayerMng.d.ts.map +1 -1
- package/dist_app/sn/Main.d.ts.map +1 -1
- package/dist_app/sn/PropParser.d.ts +7 -4
- package/dist_app/sn/PropParser.d.ts.map +1 -1
- package/dist_app/sn/Reading.d.ts +1 -1
- package/dist_app/sn/Reading.d.ts.map +1 -1
- package/dist_app/sn/ScriptIterator.d.ts.map +1 -1
- package/dist_app/sn/SndBuf.d.ts.map +1 -1
- package/dist_app/sn/Variable.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { a as v, S, b as w, R as P, e as d, L as B, D as k, k as C, f as D } from "./app2.js";
|
|
2
|
-
import { c as O, C as
|
|
3
|
-
import { G as I, A as M, t as T, a as
|
|
2
|
+
import { c as O, C as L, a as $ } from "./CallStack.js";
|
|
3
|
+
import { G as I, A as M, t as T, a as x } from "./Main.js";
|
|
4
4
|
import { R as j } from "./RubySpliter.js";
|
|
5
|
-
import { C as
|
|
5
|
+
import { C as y } from "./CmnTween.js";
|
|
6
6
|
import { a as _, R as N } from "./Reading.js";
|
|
7
7
|
import { a as W } from "./SndBuf.js";
|
|
8
8
|
class p {
|
|
9
9
|
//MARK: コンストラクタ
|
|
10
|
-
constructor(t, s, i,
|
|
11
|
-
this.cfg = t, this.hTag = s, this.main = i, this.val =
|
|
10
|
+
constructor(t, s, i, h, n, r, a) {
|
|
11
|
+
this.cfg = t, this.hTag = s, this.main = i, this.val = h, this.prpPrs = n, this.sndMng = r, this.sys = a, s.let_ml = (e) => this.#Z(e), s.endlet_ml = () => !1, s.dump_stack = () => this.#tt(), s.dump_script = (e) => this.#st(e), s.else = // その他ifブロック開始
|
|
12
12
|
s.elsif = // 別条件のifブロック開始
|
|
13
|
-
s.endif = () => this.#et(), s.if = (e) => this.#nt(e), s.call = (e) => this.#
|
|
13
|
+
s.endif = () => this.#et(), s.if = (e) => this.#nt(e), s.call = (e) => this.#ht(e), s.jump = (e) => this.#at(e), s.pop_stack = (e) => this.#ot(e), s.return = (e) => this.#j(e), s.bracket2macro = (e) => this.#kt(e), s.char2macro = (e) => this.#gt(e), s.endmacro = (e) => this.#j(e), s.macro = (e) => this.#bt(e), s.load = (e) => this.#vt(e), s.reload_script = (e) => this.#St(e), s.record_place = () => this.#q(), s.save = (e) => this.#wt(e), t.oCfg.debug.token && (this.#F = (e) => {
|
|
14
14
|
e.trim() !== "" && console.log(`🌱 トークン ${this.#i}:${String(this.#e)} (i:${String(this.#t)} cs:${String(this.#n.length)}) %c【${e}】`, "background-color:#350;");
|
|
15
|
-
}), t.oCfg.debug.tag && (this.#D = (e) => console.log(`🌲 タグ解析 ${this.#i}:${String(this.#e)} (i:${String(this.#t)} cs:${String(this.#n.length)}) %c[${e} %o]`, "background-color:#30B;", this.#r.hPrm)),
|
|
15
|
+
}), t.oCfg.debug.tag && (this.#D = (e) => console.log(`🌲 タグ解析 ${this.#i}:${String(this.#e)} (i:${String(this.#t)} cs:${String(this.#n.length)}) %c[${e} %o]`, "background-color:#30B;", this.#r.hPrm)), h.defTmp("const.sn.aIfStk.length", () => this.#o.length), h.defTmp("const.sn.vctCallStk.length", () => this.#n.length), this.#l = new I(t);
|
|
16
16
|
const l = t.oCfg.init.escape;
|
|
17
17
|
if (this.#l.setEscape(l), j.setEscape(l), v.isDbg) {
|
|
18
|
-
this.#k,
|
|
18
|
+
this.#k, a.addHook((c, f) => this.#k[c]?.(f)), this.isBreak = (c) => this.#A(c);
|
|
19
19
|
const e = () => this.analyzeInit();
|
|
20
20
|
this.analyzeInit = () => {
|
|
21
21
|
this.analyzeInit = () => {
|
|
@@ -85,7 +85,7 @@ class p {
|
|
|
85
85
|
// constructorでセット
|
|
86
86
|
//launch: // ここでは冒頭停止に間に合わないのでanalyzeInit()で
|
|
87
87
|
disconnect: () => {
|
|
88
|
-
p.#w = {}, p.#p = {}, this.isBreak = () => !1, this.#k.continue({}), this.#
|
|
88
|
+
p.#w = {}, p.#p = {}, this.isBreak = () => !1, this.#k.continue({}), this.#h = 0;
|
|
89
89
|
},
|
|
90
90
|
restart: () => {
|
|
91
91
|
this.isBreak = () => !1;
|
|
@@ -94,7 +94,7 @@ class p {
|
|
|
94
94
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
95
95
|
add_break: (t) => this.#E(t.fn, t.o),
|
|
96
96
|
data_break: (t) => {
|
|
97
|
-
this.#
|
|
97
|
+
this.#h === 0 && (this.#h = 1, this.main.setLoop(!1, `変数 ${t.dataId}【${t.old_v}】→【${t.new_v}】データブレーク`), this.sys.callHook("stopOnDataBreakpoint", {}), this.sys.send2Dbg("stopOnDataBreakpoint", {}));
|
|
98
98
|
},
|
|
99
99
|
set_func_break: (t) => {
|
|
100
100
|
p.#p = {};
|
|
@@ -110,22 +110,22 @@ class p {
|
|
|
110
110
|
},
|
|
111
111
|
// デバッガからの操作系
|
|
112
112
|
continue: () => {
|
|
113
|
-
this.#S() || (this.#t -= this.#b, this.#
|
|
113
|
+
this.#S() || (this.#t -= this.#b, this.#h = 3, this.main.setLoop(!0), this.main.resume());
|
|
114
114
|
},
|
|
115
115
|
stepover: (t) => this.#P(t),
|
|
116
116
|
stepin: () => {
|
|
117
117
|
if (this.#S()) return;
|
|
118
118
|
const t = this.#s.aToken[this.#t - this.#b];
|
|
119
|
-
this.sys.callHook(`stopOnStep${this.#N.test(t ?? "") ? "In" : ""}`, {}), this.#t -= this.#b, this.#
|
|
119
|
+
this.sys.callHook(`stopOnStep${this.#N.test(t ?? "") ? "In" : ""}`, {}), this.#t -= this.#b, this.#h = this.#h === 1 ? 4 : 5, this.main.setLoop(!0), this.main.resume();
|
|
120
120
|
},
|
|
121
121
|
stepout: (t) => {
|
|
122
122
|
this.#S() || (this.#n.length > 0 ? this.#B(!0) : this.#P(t));
|
|
123
123
|
},
|
|
124
124
|
pause: () => {
|
|
125
|
-
this.#
|
|
125
|
+
this.#h = 4, this.main.setLoop(!1, "一時停止"), this.sys.send2Dbg("stopOnStep", {});
|
|
126
126
|
},
|
|
127
127
|
stopOnEntry: () => {
|
|
128
|
-
this.#
|
|
128
|
+
this.#h = 4, this.main.setLoop(!1, "一時停止"), this.sys.send2Dbg("stopOnEntry", {});
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
#g = (t) => this.cfg.searchPath(t, S.SCRIPT);
|
|
@@ -136,11 +136,11 @@ class p {
|
|
|
136
136
|
this.#N.test(s ?? "") ? this.#B(!1) : (this.sys.callHook("stopOnStep", {}), this.#k.stepin(t));
|
|
137
137
|
}
|
|
138
138
|
#B(t) {
|
|
139
|
-
this.sys.callHook(`stopOnStep${t ? "Out" : ""}`, {}), this.#C = this.#n.length - (t ? 1 : 0), this.#t -= this.#b, this.#
|
|
139
|
+
this.sys.callHook(`stopOnStep${t ? "Out" : ""}`, {}), this.#C = this.#n.length - (t ? 1 : 0), this.#t -= this.#b, this.#h = t ? 7 : 6, this.main.setLoop(!0), this.main.resume();
|
|
140
140
|
}
|
|
141
141
|
#C = 0;
|
|
142
142
|
get #b() {
|
|
143
|
-
return this.#
|
|
143
|
+
return this.#h === 2 || this.#h === 4 ? 1 : 0;
|
|
144
144
|
}
|
|
145
145
|
#S() {
|
|
146
146
|
return this.#t < this.#s.len ? !1 : (this.sys.callHook("stopOnEntry", {}), this.main.setLoop(!1, "スクリプト終端です isIdxOverLast"), !0);
|
|
@@ -148,30 +148,30 @@ class p {
|
|
|
148
148
|
// reload 再生成 Main に受け渡すため static
|
|
149
149
|
static #w = {};
|
|
150
150
|
static #p = {};
|
|
151
|
-
#
|
|
151
|
+
#h = 0;
|
|
152
152
|
// https://raw.githubusercontent.com/famibee/SKYNovel-vscode-extension/master/src/doc/BreakStateSMD.pu
|
|
153
153
|
isBreak = (t) => !1;
|
|
154
154
|
#A(t) {
|
|
155
|
-
switch (this.#
|
|
155
|
+
switch (this.#h) {
|
|
156
156
|
case 6:
|
|
157
|
-
this.#T(), this.#
|
|
157
|
+
this.#T(), this.#h = 7;
|
|
158
158
|
break;
|
|
159
159
|
case 7:
|
|
160
160
|
if (this.#n.length !== this.#C) break;
|
|
161
|
-
return this.#
|
|
161
|
+
return this.#h = 4, this.main.setLoop(!1, "ステップ実行"), this.sys.send2Dbg("stopOnStep", {}), !0;
|
|
162
162
|
// タグを実行せず、直前停止
|
|
163
163
|
case 5:
|
|
164
|
-
this.#T(), this.#
|
|
164
|
+
this.#T(), this.#h = 4;
|
|
165
165
|
break;
|
|
166
166
|
case 4:
|
|
167
167
|
return this.#T(), this.main.setLoop(!1, "ステップ実行"), this.sys.send2Dbg("stopOnStep", {}), !0;
|
|
168
168
|
// タグを実行せず、直前停止
|
|
169
169
|
case 3:
|
|
170
|
-
this.#T(), this.#
|
|
170
|
+
this.#T(), this.#h = 0;
|
|
171
171
|
break;
|
|
172
172
|
default:
|
|
173
173
|
if (T(t) in p.#p)
|
|
174
|
-
return this.#
|
|
174
|
+
return this.#h = 2, this.main.setLoop(!1, `関数 ${t} ブレーク`), this.sys.callHook("stopOnBreakpoint", {}), this.sys.send2Dbg("stopOnBreakpoint", {}), !0;
|
|
175
175
|
{
|
|
176
176
|
const s = p.#w[this.#_(this.#i)];
|
|
177
177
|
if (!s) break;
|
|
@@ -180,13 +180,13 @@ class p {
|
|
|
180
180
|
if (i.condition) {
|
|
181
181
|
if (!this.prpPrs.parse(i.condition)) break;
|
|
182
182
|
} else if ("hitCondition" in i && --i.hitCondition > 0) break;
|
|
183
|
-
const
|
|
184
|
-
this.#
|
|
183
|
+
const h = this.#h === 0;
|
|
184
|
+
this.#h = 2, this.main.setLoop(!1, h ? (
|
|
185
185
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
186
186
|
(i.condition ? "条件" : "ヒットカウント") + "ブレーク"
|
|
187
187
|
) : "ステップ実行");
|
|
188
|
-
const
|
|
189
|
-
this.sys.callHook(
|
|
188
|
+
const n = h ? "stopOnBreakpoint" : "stopOnStep";
|
|
189
|
+
this.sys.callHook(n, {}), this.sys.send2Dbg(n, {});
|
|
190
190
|
}
|
|
191
191
|
return !0;
|
|
192
192
|
}
|
|
@@ -197,12 +197,12 @@ class p {
|
|
|
197
197
|
t?.hitCondition && --t.hitCondition;
|
|
198
198
|
}
|
|
199
199
|
#J() {
|
|
200
|
-
const t = this.#
|
|
201
|
-
if (this.#t === 0) return [{ fn: i, ln: 1, col: 1, nm:
|
|
202
|
-
const
|
|
200
|
+
const t = this.#h === 3 ? 1 : 0, s = this.#s.aToken[this.#t - 1 + t], i = this.#_(this.#i), h = T(s), n = h ? `[${h}]` : s, r = String(this.val.getVal("mp:const.sn.macro") ?? "{}");
|
|
201
|
+
if (this.#t === 0) return [{ fn: i, ln: 1, col: 1, nm: n, ma: r }];
|
|
202
|
+
const a = this.#c(this.#s, this.#t), l = [{ fn: i, ln: a.ln, col: a.col_s + 1, nm: n, ma: r }], e = this.#n.length;
|
|
203
203
|
if (e === 0) return l;
|
|
204
204
|
for (let c = e - 1; c >= 0; --c) {
|
|
205
|
-
const f = this.#n[c], o = this.#
|
|
205
|
+
const f = this.#n[c], o = this.#a[f.fn];
|
|
206
206
|
if (!o) continue;
|
|
207
207
|
const u = o.aToken[f.idx - 1];
|
|
208
208
|
if (!u) continue;
|
|
@@ -225,45 +225,45 @@ class p {
|
|
|
225
225
|
const i = this.hTag[t];
|
|
226
226
|
if (!i) throw `未定義のタグ【${t}】です`;
|
|
227
227
|
this.#r.parse(s), this.#D(t);
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
230
|
-
const e =
|
|
228
|
+
const h = this.#r.hPrm;
|
|
229
|
+
if (h.cond) {
|
|
230
|
+
const e = h.cond.val;
|
|
231
231
|
if (!e || e.startsWith("&")) throw "属性condは「&」が不要です";
|
|
232
232
|
const c = this.prpPrs.parse(e), f = String(c);
|
|
233
233
|
if (f === "null" || f === "undefined" || !c) return !1;
|
|
234
234
|
}
|
|
235
|
-
let
|
|
236
|
-
const r = this.#n.at(-1)?.csArg ?? O(),
|
|
235
|
+
let n = {};
|
|
236
|
+
const r = this.#n.at(-1)?.csArg ?? O(), a = this.#n.length;
|
|
237
237
|
if (this.#r.isKomeParam) {
|
|
238
|
-
if (
|
|
239
|
-
|
|
238
|
+
if (a === 0) throw "属性「*」はマクロのみ有効です";
|
|
239
|
+
n = { ...r };
|
|
240
240
|
}
|
|
241
|
-
|
|
242
|
-
for (const [e, { val: c, def: f }] of Object.entries(
|
|
241
|
+
n[":タグ名"] = t;
|
|
242
|
+
for (const [e, { val: c, def: f }] of Object.entries(h)) {
|
|
243
243
|
let o = c;
|
|
244
244
|
if (c.startsWith("%")) {
|
|
245
|
-
if (
|
|
245
|
+
if (a === 0) throw "属性「%」はマクロ定義内でのみ使用できます(そのマクロの引数を示す簡略文法であるため)";
|
|
246
246
|
const u = r[o.slice(1)];
|
|
247
247
|
if (u) {
|
|
248
|
-
|
|
248
|
+
n[e] = u;
|
|
249
249
|
continue;
|
|
250
250
|
}
|
|
251
251
|
if (f === void 0 || f === "null") continue;
|
|
252
252
|
o = f;
|
|
253
253
|
}
|
|
254
254
|
if (o = this.prpPrs.getValAmpersand(o ?? ""), o !== "undefined") {
|
|
255
|
-
|
|
255
|
+
n[e] = o;
|
|
256
256
|
continue;
|
|
257
257
|
}
|
|
258
|
-
f !== void 0 && (o = this.prpPrs.getValAmpersand(f), o !== "undefined" && (
|
|
258
|
+
f !== void 0 && (o = this.prpPrs.getValAmpersand(f), o !== "undefined" && (n[e] = o));
|
|
259
259
|
}
|
|
260
260
|
if (_.needGoTxt && this.#U.has(t)) {
|
|
261
261
|
const { promise: e, resolve: c } = Promise.withResolvers();
|
|
262
262
|
_.beginProc(P, () => c(0), !1, () => c(0)), _.goTxt(), this.val.saveKidoku(), await e;
|
|
263
263
|
}
|
|
264
|
-
this.#X.has(t) && (this.#x.hideHint(),
|
|
264
|
+
this.#X.has(t) && (this.#x.hideHint(), y.stopEndTrans());
|
|
265
265
|
const l = this.#Q[t];
|
|
266
|
-
return l && d(
|
|
266
|
+
return l && d(n, "canskip", this.#Y[t] ?? !0) && this.#x.isSkipping ? l(n) : i(n);
|
|
267
267
|
}
|
|
268
268
|
// 文字出現演出を待つタグ
|
|
269
269
|
// ここで列挙せずタグ処理で文字表示を始めたい場合、goTxt()すること
|
|
@@ -429,7 +429,7 @@ class p {
|
|
|
429
429
|
]);
|
|
430
430
|
// キー押しっぱなしスキップで処理せずスルーするタグ
|
|
431
431
|
#Q = {
|
|
432
|
-
wt: () => !1,
|
|
432
|
+
wt: () => (y.stopEndTrans(), !1),
|
|
433
433
|
// トランス終了待ち
|
|
434
434
|
wait_tsy: (t) => this.hTag.stop_tsy(t),
|
|
435
435
|
// トゥイーン終了待ち
|
|
@@ -486,8 +486,8 @@ class p {
|
|
|
486
486
|
const { name: s } = t;
|
|
487
487
|
if (!s) throw "nameは必須です";
|
|
488
488
|
let i = "";
|
|
489
|
-
const
|
|
490
|
-
for (; this.#t <
|
|
489
|
+
const h = this.#s.len;
|
|
490
|
+
for (; this.#t < h && (i = this.#s.aToken[this.#t], i === ""); ++this.#t)
|
|
491
491
|
;
|
|
492
492
|
return t.text = i, t.cast = "str", this.hTag.let(t), this.#t += 2, this.#e += (i.match(/\n/g) ?? []).length, !1;
|
|
493
493
|
}
|
|
@@ -500,10 +500,10 @@ class p {
|
|
|
500
500
|
const i = this.#n.length;
|
|
501
501
|
if (i > 0) {
|
|
502
502
|
console.info(s);
|
|
503
|
-
for (let
|
|
504
|
-
const
|
|
503
|
+
for (let h = i - 1; h >= 0; --h) {
|
|
504
|
+
const n = this.#n[h], r = n.csArg[":hMp"], a = r ? r[":タグ名"] : void 0, l = n.csArg[":タグ名"] ?? "", e = this.#c(this.#a[n.fn], n.idx);
|
|
505
505
|
console.info(
|
|
506
|
-
`${String(i -
|
|
506
|
+
`${String(i - h)}つ前のコール元 fn:${n.fn} line:${String(e.ln)} col:${String(e.col_s + 1)}${a ? "([" + a + "]マクロ内)" : " "}で [${l} ...]をコール`
|
|
507
507
|
);
|
|
508
508
|
}
|
|
509
509
|
}
|
|
@@ -512,16 +512,16 @@ class p {
|
|
|
512
512
|
#c(t, s) {
|
|
513
513
|
const i = { ln: 1, col_s: 0, col_e: 0 };
|
|
514
514
|
if (!t) return i;
|
|
515
|
-
let
|
|
516
|
-
const
|
|
517
|
-
for (; t.aLNum[
|
|
518
|
-
const r = t.aToken[
|
|
515
|
+
let h = s - 1;
|
|
516
|
+
const n = i.ln = t.aLNum[h];
|
|
517
|
+
for (; t.aLNum[h] === n; ) {
|
|
518
|
+
const r = t.aToken[h];
|
|
519
519
|
if (!r.startsWith(`
|
|
520
520
|
`)) {
|
|
521
|
-
const
|
|
522
|
-
i.col_e > 0 && (i.col_s +=
|
|
521
|
+
const a = r.length;
|
|
522
|
+
i.col_e > 0 && (i.col_s += a), i.col_e += a;
|
|
523
523
|
}
|
|
524
|
-
if (--
|
|
524
|
+
if (--h < 0) break;
|
|
525
525
|
}
|
|
526
526
|
return i;
|
|
527
527
|
}
|
|
@@ -534,10 +534,10 @@ class p {
|
|
|
534
534
|
return this.#y = () => {
|
|
535
535
|
}, !1;
|
|
536
536
|
}
|
|
537
|
-
if (this.noticeBreak = (
|
|
537
|
+
if (this.noticeBreak = (h) => {
|
|
538
538
|
this.#O !== this.#i && (this.#O = this.#i, this.#y(
|
|
539
539
|
this.#it[this.#i] ??= this.#s.aToken.join("")
|
|
540
|
-
)), this.#L(this.#e,
|
|
540
|
+
)), this.#L(this.#e, h);
|
|
541
541
|
}, this.noticeBreak(!0), !i) return !1;
|
|
542
542
|
if (this.#L = globalThis[i], !this.#L) {
|
|
543
543
|
if (d(t, "need_err", !0)) throw `HTML内に関数${i}が見つかりません`;
|
|
@@ -566,11 +566,11 @@ class p {
|
|
|
566
566
|
const s = t.split(`
|
|
567
567
|
`).slice(-this.#I), i = s.length;
|
|
568
568
|
console.group(`🥟 Error line (from ${String(i)} rows before) fn:${this.#i}`);
|
|
569
|
-
const
|
|
569
|
+
const h = String(this.#e).length, n = this.#c(this.#s, this.#t);
|
|
570
570
|
for (let r = 0; r < i; ++r) {
|
|
571
|
-
const
|
|
571
|
+
const a = this.#e - i + r + 1, l = `${String(a).padStart(h, " ")}: %c`, e = s[r], c = e.length > 75 ? e.slice(0, 75) + "…" : e;
|
|
572
572
|
r === i - 1 ? console.info(
|
|
573
|
-
l + c.slice(0,
|
|
573
|
+
l + c.slice(0, n.col_s) + "%c" + c.slice(n.col_s),
|
|
574
574
|
"color: black; background-color: skyblue;",
|
|
575
575
|
"color: black; background-color: pink;"
|
|
576
576
|
) : console.info(l + c, "color: black; background-color: skyblue;");
|
|
@@ -591,9 +591,9 @@ class p {
|
|
|
591
591
|
const { exp: s } = t;
|
|
592
592
|
if (!s) throw "expは必須です";
|
|
593
593
|
if (s.startsWith("&")) throw "属性expは「&」が不要です";
|
|
594
|
-
let i = 0,
|
|
595
|
-
const
|
|
596
|
-
for (; this.#t <
|
|
594
|
+
let i = 0, h = this.prpPrs.parse(s) ? this.#t : -1;
|
|
595
|
+
const n = this.#s.aLNum[this.#t], r = this.#e - ((n ?? 0) || 0), a = this.#s.len;
|
|
596
|
+
for (; this.#t < a; ++this.#t) {
|
|
597
597
|
const l = this.#s.aLNum[this.#t];
|
|
598
598
|
this.#s.aLNum[this.#t] = ((l ?? 0) || 0) + r;
|
|
599
599
|
const e = this.#s.aToken[this.#t];
|
|
@@ -604,7 +604,7 @@ class p {
|
|
|
604
604
|
continue;
|
|
605
605
|
}
|
|
606
606
|
if (c !== 91) continue;
|
|
607
|
-
const [f, o] =
|
|
607
|
+
const [f, o] = x(e);
|
|
608
608
|
if (!(f in this.hTag)) throw `未定義のタグ[${f}]です`;
|
|
609
609
|
switch (this.#r.parse(o), f) {
|
|
610
610
|
case "if":
|
|
@@ -612,29 +612,29 @@ class p {
|
|
|
612
612
|
break;
|
|
613
613
|
case "elsif":
|
|
614
614
|
{
|
|
615
|
-
if (i > 0 ||
|
|
615
|
+
if (i > 0 || h > -1) break;
|
|
616
616
|
const u = this.#r.hPrm.exp?.val;
|
|
617
617
|
if (!u) throw "expは必須です";
|
|
618
618
|
if (u.startsWith("&")) throw "属性expは「&」が不要です";
|
|
619
|
-
this.prpPrs.parse(u) && (
|
|
619
|
+
this.prpPrs.parse(u) && (h = this.#t + 1);
|
|
620
620
|
}
|
|
621
621
|
break;
|
|
622
622
|
case "else":
|
|
623
623
|
if (i > 0) break;
|
|
624
|
-
|
|
624
|
+
h === -1 && (h = this.#t + 1);
|
|
625
625
|
break;
|
|
626
626
|
case "endif":
|
|
627
627
|
if (i > 0) {
|
|
628
628
|
--i;
|
|
629
629
|
break;
|
|
630
630
|
}
|
|
631
|
-
return
|
|
631
|
+
return h === -1 ? (++this.#t, this.#s.aLNum[this.#t] += r) : (this.#o.unshift(this.#t + 1), this.#t = h, this.#e = this.#s.aLNum[this.#t]), !1;
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
throw "[endif]がないままスクリプト終端です";
|
|
635
635
|
}
|
|
636
636
|
//MARK: サブルーチンコール
|
|
637
|
-
#
|
|
637
|
+
#ht(t) {
|
|
638
638
|
d(t, "count", !1) || this.#V();
|
|
639
639
|
const { fn: s } = t;
|
|
640
640
|
return s && this.#g(s), this.#M({ ...t }, N.popLocalEvts()), d(t, "clear_local_event", !1) && this.hTag.clear_event({}), this.#f(s, t.label);
|
|
@@ -646,17 +646,17 @@ class p {
|
|
|
646
646
|
":hMp": this.val.cloneMp(),
|
|
647
647
|
":lenIfStk": this.#o.length
|
|
648
648
|
};
|
|
649
|
-
this.#s.aLNum[this.#t] = this.#e, this.#W || (i[":resvToken"] = "", this.#$()), this.#n.push(new
|
|
649
|
+
this.#s.aLNum[this.#t] = this.#e, this.#W || (i[":resvToken"] = "", this.#$()), this.#n.push(new L(this.#i, this.#t, i)), this.#o.unshift(-1);
|
|
650
650
|
}
|
|
651
651
|
//MARK: シナリオジャンプ
|
|
652
|
-
#
|
|
652
|
+
#at(t) {
|
|
653
653
|
return d(t, "count", !0) || this.#V(), this.#o[0] = -1, this.#f(t.fn, t.label);
|
|
654
654
|
}
|
|
655
655
|
//MARK: コールスタック破棄
|
|
656
656
|
#ot(t) {
|
|
657
657
|
if (d(t, "clear", !1)) this.#n = [];
|
|
658
658
|
else if (!this.#n.pop()) throw "スタックが空です";
|
|
659
|
-
return this.#$(), this.#o = [-1], this.val.setMp(
|
|
659
|
+
return this.#$(), this.#o = [-1], this.val.setMp($()), !1;
|
|
660
660
|
}
|
|
661
661
|
//MARK: サブルーチンから戻る
|
|
662
662
|
#j(t) {
|
|
@@ -664,12 +664,12 @@ class p {
|
|
|
664
664
|
if (!s) throw "スタックが空です";
|
|
665
665
|
const i = s.csArg;
|
|
666
666
|
this.#o = this.#o.slice(-i[":lenIfStk"]);
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
const { fn: r, label:
|
|
672
|
-
return r ||
|
|
667
|
+
const h = i[":hMp"];
|
|
668
|
+
h && this.val.setMp(h);
|
|
669
|
+
const n = i[":resvToken"];
|
|
670
|
+
n ? this.nextToken = () => (this.#$(), n) : this.#$(), i[":hEvt1Time"] && N.pushLocalEvts(i[":hEvt1Time"]);
|
|
671
|
+
const { fn: r, label: a } = t;
|
|
672
|
+
return r || a ? this.#f(r, a) : s.fn in this.#a ? (this.#z(s), !1) : this.#f(s.fn, "", s.idx);
|
|
673
673
|
}
|
|
674
674
|
#W = "";
|
|
675
675
|
#$() {
|
|
@@ -680,21 +680,21 @@ class p {
|
|
|
680
680
|
if (v.debugLog && console.log(`📜 %c1:jumpWork%c fn:${t} lbl:${s} idx:${String(i)}`, "color:#3B0;", ""), !t && !s && this.main.errScript("[jump系] fnまたはlabelは必須です"), s ? (s.startsWith("*") || this.main.errScript("[jump系] labelは*で始まります"), this.#v = s, this.#v.startsWith("**") || (this.#t = i)) : (this.#v = "", this.#t = i), !t)
|
|
681
681
|
return this.analyzeInit(), !1;
|
|
682
682
|
if (t.includes("@")) throw "[jump系] fn には文字「@」は禁止です";
|
|
683
|
-
const
|
|
683
|
+
const h = this.#g(t);
|
|
684
684
|
if (t === this.#i)
|
|
685
685
|
return this.analyzeInit(), !1;
|
|
686
686
|
this.#i = t;
|
|
687
|
-
const
|
|
688
|
-
if (
|
|
689
|
-
return this.#s =
|
|
687
|
+
const n = this.#a[t];
|
|
688
|
+
if (n)
|
|
689
|
+
return this.#s = n, this.analyzeInit(), !1;
|
|
690
690
|
const r = `jumpWork fn:${t}`;
|
|
691
691
|
_.beginProc(r);
|
|
692
|
-
let
|
|
692
|
+
let a = "";
|
|
693
693
|
const l = new B();
|
|
694
694
|
try {
|
|
695
|
-
|
|
695
|
+
a = this.#g(t + "@"), l.add({ name: t + ":base", url: h }), l.add({ name: t, url: a });
|
|
696
696
|
} catch {
|
|
697
|
-
l.add({ name: t, url:
|
|
697
|
+
l.add({ name: t, url: h });
|
|
698
698
|
}
|
|
699
699
|
return l.use((e, c) => {
|
|
700
700
|
this.sys.dec(e.extension, e.data).then((f) => {
|
|
@@ -703,7 +703,7 @@ class p {
|
|
|
703
703
|
this.main.errScript(`[jump系]snロード失敗です fn:${e.name} ${String(f)}`, !1), c();
|
|
704
704
|
});
|
|
705
705
|
}).load((e, c) => {
|
|
706
|
-
if (_.endProc(r),
|
|
706
|
+
if (_.endProc(r), a) {
|
|
707
707
|
const f = c[t + ":base"].data, o = c[t].data, u = f.split(`
|
|
708
708
|
`), m = o.split(`
|
|
709
709
|
`), b = u.length, E = m.length;
|
|
@@ -736,79 +736,79 @@ class p {
|
|
|
736
736
|
#rt = /(\*{2,})([^|]*)/;
|
|
737
737
|
#lt = /^\[macro\s/;
|
|
738
738
|
#K = /^\[endmacro[\s\]]/;
|
|
739
|
-
#ct(t, s, i,
|
|
739
|
+
#ct(t, s, i, h, n) {
|
|
740
740
|
const r = t.aToken.length;
|
|
741
|
-
let
|
|
741
|
+
let a = i, l = h;
|
|
742
742
|
if (!l) {
|
|
743
|
-
if (this.#H()) return { idx:
|
|
744
|
-
if (t.aLNum[
|
|
745
|
-
|
|
743
|
+
if (this.#H()) return { idx: n, ln: a };
|
|
744
|
+
if (t.aLNum[n])
|
|
745
|
+
a = t.aLNum[n];
|
|
746
746
|
else {
|
|
747
|
-
|
|
748
|
-
for (let o = 0; o <
|
|
749
|
-
t.aLNum[o] ||=
|
|
747
|
+
a = 1;
|
|
748
|
+
for (let o = 0; o < n; ++o) {
|
|
749
|
+
t.aLNum[o] ||= a;
|
|
750
750
|
const u = t.aToken[o];
|
|
751
751
|
u.startsWith(`
|
|
752
|
-
`) ?
|
|
752
|
+
`) ? a += u.length : a += (u.match(/\n/g) ?? []).length;
|
|
753
753
|
}
|
|
754
|
-
t.aLNum[
|
|
754
|
+
t.aLNum[n] = a;
|
|
755
755
|
}
|
|
756
|
-
return { idx:
|
|
756
|
+
return { idx: n, ln: a };
|
|
757
757
|
}
|
|
758
758
|
t.aLNum[0] = 1;
|
|
759
759
|
const e = l.match(this.#rt);
|
|
760
760
|
if (e) {
|
|
761
761
|
l = e[1];
|
|
762
|
-
let o =
|
|
762
|
+
let o = n;
|
|
763
763
|
switch (e[2]) {
|
|
764
764
|
case "before":
|
|
765
765
|
for (; t.aToken[--o] !== l; )
|
|
766
766
|
o === 0 && k.myTrace(`[jump系 無名ラベルbefore]
|
|
767
|
-
${String(
|
|
767
|
+
${String(a)} 行目以前で ${s ? "マクロ内に" : ""} ラベル【 ${l} 】がありません`, "ET"), s && t.aToken[o].search(this.#lt) > -1 && k.myTrace("[jump系 無名ラベルbefore] マクロ内にラベル【" + l + "】がありません", "ET");
|
|
768
768
|
return { idx: o + 1, ln: t.aLNum[o] };
|
|
769
769
|
// break;
|
|
770
770
|
case "after":
|
|
771
771
|
for (; t.aToken[++o] !== l; )
|
|
772
|
-
o === r && k.myTrace(`[jump系 無名ラベルafter] ${String(
|
|
772
|
+
o === r && k.myTrace(`[jump系 無名ラベルafter] ${String(a)} 行目以後でマクロ内にラベル【${l}】がありません`, "ET"), t.aToken[o].search(this.#K) > -1 && k.myTrace(`[jump系 無名ラベルafter] ${String(a)} 行目以後でマクロ内にラベル【 ${l} 】がありません`, "ET");
|
|
773
773
|
return { idx: o + 1, ln: t.aLNum[o] };
|
|
774
774
|
// break;
|
|
775
775
|
default:
|
|
776
776
|
k.myTrace("[jump系] 無名ラベル指定【label=" + l + "】が間違っています", "ET");
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
|
-
|
|
779
|
+
a = 1;
|
|
780
780
|
const c = new RegExp(
|
|
781
781
|
"^" + l.replaceAll("*", "\\*") + "(?=\\s|;|\\[|\\||$)"
|
|
782
782
|
);
|
|
783
783
|
let f = !1;
|
|
784
784
|
for (let o = 0; o < r; ++o) {
|
|
785
|
-
t.aLNum[o] ||=
|
|
785
|
+
t.aLNum[o] ||= a;
|
|
786
786
|
const u = t.aToken[o];
|
|
787
787
|
if (f) {
|
|
788
|
-
this.#l.testTagEndLetml(u) ? f = !1 :
|
|
788
|
+
this.#l.testTagEndLetml(u) ? f = !1 : a += (u.match(/\n/g) ?? []).length;
|
|
789
789
|
continue;
|
|
790
790
|
}
|
|
791
791
|
const m = u.charCodeAt(0);
|
|
792
792
|
if (m === 10) {
|
|
793
|
-
|
|
793
|
+
a += u.length;
|
|
794
794
|
continue;
|
|
795
795
|
}
|
|
796
796
|
if (m === 42) {
|
|
797
|
-
if (u.search(c) > -1) return { idx: o + 1, ln:
|
|
797
|
+
if (u.search(c) > -1) return { idx: o + 1, ln: a };
|
|
798
798
|
continue;
|
|
799
799
|
}
|
|
800
|
-
m === 91 && (
|
|
800
|
+
m === 91 && (a += (u.match(/\n/g) ?? []).length, this.#l.testTagLetml(u) && (f = !0));
|
|
801
801
|
}
|
|
802
802
|
throw f ? "[let_ml]の終端・[endlet_ml]がありません" : (k.myTrace(`[jump系] ラベル【${l}】がありません`, "ET"), "Dummy");
|
|
803
803
|
}
|
|
804
|
-
#
|
|
804
|
+
#a = /* @__PURE__ */ Object.create(null);
|
|
805
805
|
//{} シナリオキャッシュ
|
|
806
806
|
#ft(t) {
|
|
807
807
|
let s = "";
|
|
808
808
|
try {
|
|
809
809
|
s = "ScriptIterator.resolveScript";
|
|
810
810
|
const i = this.#l.resolveScript(t);
|
|
811
|
-
s = "ScriptIterator.replaceScript_Wildcard", this.#mt(i), this.#
|
|
811
|
+
s = "ScriptIterator.replaceScript_Wildcard", this.#mt(i), this.#a[this.#i] = this.#s = i;
|
|
812
812
|
} catch (i) {
|
|
813
813
|
i instanceof Error ? s += `例外 mes=${i.message}(${i.name})` : s = String(i), this.main.errScript(s, !1);
|
|
814
814
|
}
|
|
@@ -816,7 +816,7 @@ class p {
|
|
|
816
816
|
}
|
|
817
817
|
#z(t) {
|
|
818
818
|
this.#i = t.fn, this.#t = t.idx;
|
|
819
|
-
const s = this.#
|
|
819
|
+
const s = this.#a[this.#i];
|
|
820
820
|
s && (this.#s = s), this.#e = this.#s.aLNum[t.idx];
|
|
821
821
|
}
|
|
822
822
|
#ut = /^\[(call|loadplugin)\s/;
|
|
@@ -825,14 +825,14 @@ class p {
|
|
|
825
825
|
for (let s = t.len - 1; s >= 0; --s) {
|
|
826
826
|
const i = t.aToken[s];
|
|
827
827
|
if (!this.#ut.test(i)) continue;
|
|
828
|
-
const [
|
|
829
|
-
this.#r.parse(
|
|
828
|
+
const [h, n] = x(i);
|
|
829
|
+
this.#r.parse(n);
|
|
830
830
|
const r = this.#r.hPrm.fn;
|
|
831
831
|
if (!r) continue;
|
|
832
|
-
const { val:
|
|
833
|
-
if (!
|
|
832
|
+
const { val: a } = r;
|
|
833
|
+
if (!a.endsWith("*")) continue;
|
|
834
834
|
t.aToken.splice(s, 1, " ", "; " + i), t.aLNum.splice(s, 1, NaN, NaN);
|
|
835
|
-
const l =
|
|
835
|
+
const l = h === "loadplugin" ? S.CSS : S.SN, e = this.cfg.matchPath("^" + a.slice(0, -1) + ".*", l);
|
|
836
836
|
for (const c of e) {
|
|
837
837
|
const f = i.replace(
|
|
838
838
|
this.#pt,
|
|
@@ -861,9 +861,9 @@ class p {
|
|
|
861
861
|
get isNextKidoku() {
|
|
862
862
|
let t = this.#i, s = this.#t, i = this.#s.len;
|
|
863
863
|
if (this.#n.length > 0) {
|
|
864
|
-
const
|
|
865
|
-
t =
|
|
866
|
-
const r = this.#
|
|
864
|
+
const n = this.#n[0];
|
|
865
|
+
t = n.fn, s = n.idx;
|
|
866
|
+
const r = this.#a[t];
|
|
867
867
|
r && (i = r.len);
|
|
868
868
|
}
|
|
869
869
|
return s === i ? !1 : this.val.getAreaKidoku(t)?.search(s) ?? !1;
|
|
@@ -887,19 +887,19 @@ class p {
|
|
|
887
887
|
if (!s) throw "nameは必須です";
|
|
888
888
|
if (s in this.hTag) throw `[${s}]はタグかすでに定義済みのマクロです`;
|
|
889
889
|
if (this.#_t.test(s)) throw `[${s}]はマクロ名として異常です`;
|
|
890
|
-
const i = this.#e,
|
|
891
|
-
for (this.#G += "|" + s, this.#N = new RegExp(`\\[(${this.#G})\\b`), this.hTag[s] = (
|
|
892
|
-
...
|
|
890
|
+
const i = this.#e, h = new L(this.#i, this.#t);
|
|
891
|
+
for (this.#G += "|" + s, this.#N = new RegExp(`\\[(${this.#G})\\b`), this.hTag[s] = (n) => (n.design_unit = t.design_unit, this.#M(n), this.val.setMp({
|
|
892
|
+
...n,
|
|
893
893
|
"const.sn.macro": JSON.stringify({ name: t.name }),
|
|
894
894
|
// ムダに大きいスクリプター用情報を削除、名前だけに
|
|
895
895
|
"const.sn.me_call_scriptFn": this.#i
|
|
896
|
-
}), this.val.setVal_Nochk("mp", "const.sn.me_call_scriptFn", this.#i), this.#e = i, this.#z(
|
|
896
|
+
}), this.val.setVal_Nochk("mp", "const.sn.me_call_scriptFn", this.#i), this.#e = i, this.#z(h), !1); this.#t < this.#s.len; ++this.#t) {
|
|
897
897
|
this.#s.aLNum[this.#t] ||= this.#e;
|
|
898
|
-
const
|
|
899
|
-
if (
|
|
898
|
+
const n = this.#s.aToken[this.#t];
|
|
899
|
+
if (n.search(this.#K) > -1)
|
|
900
900
|
return ++this.#t, !1;
|
|
901
|
-
const r =
|
|
902
|
-
r === 10 ? this.#e +=
|
|
901
|
+
const r = n.charCodeAt(0);
|
|
902
|
+
r === 10 ? this.#e += n.length : r === 91 && (this.#e += (n.match(/\n/g) ?? []).length);
|
|
903
903
|
}
|
|
904
904
|
throw `マクロ[${s}]定義の終端・[endmacro]がありません`;
|
|
905
905
|
}
|
|
@@ -919,9 +919,9 @@ class p {
|
|
|
919
919
|
);
|
|
920
920
|
}
|
|
921
921
|
loadFromMark(t, s, i = 0) {
|
|
922
|
-
this.hTag.clear_event({}), this.val.mark2save(s), this.val.setMp(
|
|
923
|
-
let
|
|
924
|
-
i !== 1 && (
|
|
922
|
+
this.hTag.clear_event({}), this.val.mark2save(s), this.val.setMp($()), this.#m.recPagebreak();
|
|
923
|
+
let h = [];
|
|
924
|
+
i !== 1 && (h = this.sndMng.playLoopFromSaveObj(
|
|
925
925
|
i === 2
|
|
926
926
|
/* ALL_STOP_AND_PLAY */
|
|
927
927
|
)), d(t, "do_rec", !0) && (this.#u = {
|
|
@@ -929,20 +929,20 @@ class p {
|
|
|
929
929
|
hPages: { ...s.hPages },
|
|
930
930
|
aIfStk: [...s.aIfStk]
|
|
931
931
|
});
|
|
932
|
-
const
|
|
932
|
+
const n = {
|
|
933
933
|
enabled: !!this.val.getVal("save:const.sn.autowc.enabled"),
|
|
934
934
|
text: String(this.val.getVal("save:const.sn.autowc.text")),
|
|
935
935
|
time: Number(this.val.getVal("save:const.sn.autowc.time"))
|
|
936
936
|
};
|
|
937
|
-
this.hTag.autowc(
|
|
938
|
-
const r = Promise.allSettled([...
|
|
939
|
-
if (
|
|
940
|
-
return v.debugLog && console.log(`📜 %cloadFromMark index:${String(
|
|
941
|
-
this.#f(l, "",
|
|
937
|
+
this.hTag.autowc(n), this.#o = [...this.#u.aIfStk], this.#n = [], y.stopAllTw();
|
|
938
|
+
const r = Promise.allSettled([...h, ...this.#m.playback(this.#u.hPages)]).then(() => this.#m.cover(!1)), { index: a, fn: l } = t;
|
|
939
|
+
if (a)
|
|
940
|
+
return v.debugLog && console.log(`📜 %cloadFromMark index:${String(a)} move!%c fn:${l ?? ""}`, "color:#3B0;", ""), r.then(() => {
|
|
941
|
+
this.#f(l, "", a) || this.main.resume();
|
|
942
942
|
}).catch((o) => console.error("loadFromMark e:%o", o)), !0;
|
|
943
943
|
this.#m.cover(!0);
|
|
944
944
|
const e = String(this.val.getVal("save:const.sn.scriptFn")), c = Number(this.val.getVal("save:const.sn.scriptIdx"));
|
|
945
|
-
delete this.#
|
|
945
|
+
delete this.#a[e];
|
|
946
946
|
const { label: f } = t;
|
|
947
947
|
return r.then(f ? () => {
|
|
948
948
|
this.#i = e, this.#t = c, this.hTag.call({ fn: l, label: f }) || this.main.resume();
|
|
@@ -954,15 +954,15 @@ class p {
|
|
|
954
954
|
#St(t) {
|
|
955
955
|
const s = this.val.getMark(0);
|
|
956
956
|
if (!s) return !1;
|
|
957
|
-
delete this.#
|
|
957
|
+
delete this.#a[w(s.hSave["const.sn.scriptFn"])];
|
|
958
958
|
const i = {};
|
|
959
|
-
for (const
|
|
959
|
+
for (const h in this.#a)
|
|
960
960
|
try {
|
|
961
|
-
this.#g(
|
|
961
|
+
this.#g(h + "@");
|
|
962
962
|
} catch {
|
|
963
|
-
i[
|
|
963
|
+
i[h] = this.#a[h];
|
|
964
964
|
}
|
|
965
|
-
return this.#
|
|
965
|
+
return this.#a = i, t.do_rec = !1, this.loadFromMark(
|
|
966
966
|
t,
|
|
967
967
|
s,
|
|
968
968
|
1
|
|
@@ -999,8 +999,8 @@ class p {
|
|
|
999
999
|
}
|
|
1000
1000
|
//MARK: スクリプト停止位置(マクロなどなら最上位の呼び元)
|
|
1001
1001
|
nowScrFnLn() {
|
|
1002
|
-
const { fn: t, idx: s } = this.nowScrIdx(), i = this.#
|
|
1003
|
-
return { fn: t, ...
|
|
1002
|
+
const { fn: t, idx: s } = this.nowScrIdx(), i = this.#a[t], h = this.#c(i, s);
|
|
1003
|
+
return { fn: t, ...h };
|
|
1004
1004
|
}
|
|
1005
1005
|
//MARK: しおりの保存
|
|
1006
1006
|
#wt(t) {
|
|
@@ -1012,17 +1012,17 @@ class p {
|
|
|
1012
1012
|
}
|
|
1013
1013
|
recodeDesign(t) {
|
|
1014
1014
|
let s = "", i = 0;
|
|
1015
|
-
const
|
|
1016
|
-
if (t.design_unit &&
|
|
1015
|
+
const h = this.#n.length;
|
|
1016
|
+
if (t.design_unit && h > 0) {
|
|
1017
1017
|
const l = this.#n[0];
|
|
1018
1018
|
s = l.fn, i = l.idx;
|
|
1019
1019
|
} else
|
|
1020
1020
|
s = this.#i, i = this.#t;
|
|
1021
1021
|
t[":path"] = this.#_(s);
|
|
1022
|
-
const
|
|
1022
|
+
const n = this.#a[s], r = this.#c(n, i);
|
|
1023
1023
|
t[":ln"] = r.ln, t[":col_s"] = r.col_s, t[":col_e"] = r.col_e;
|
|
1024
|
-
const
|
|
1025
|
-
t[":idx_tkn"] =
|
|
1024
|
+
const a = i - 1;
|
|
1025
|
+
t[":idx_tkn"] = a, t[":token"] = n.aToken[a], this.sys.send2Dbg("_recodeDesign", t);
|
|
1026
1026
|
}
|
|
1027
1027
|
replace(t, s) {
|
|
1028
1028
|
this.#s.aToken[t] = s;
|