@temperlang/std 0.4.0 → 0.5.0
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/index.js +1 -1
- package/json.js +1428 -1360
- package/json.js.map +1 -1
- package/net.js +49 -0
- package/net.js.map +1 -0
- package/package.json +3 -3
- package/regex.js +704 -640
- package/regex.js.map +1 -1
- package/temporal.js +66 -64
- package/temporal.js.map +1 -1
- package/testing.js +150 -118
- package/testing.js.map +1 -1
- package/strings.js +0 -1
- package/strings.js.map +0 -1
package/regex.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
type as type__10, requireInstanceOf as
|
|
2
|
+
type as type__10, requireInstanceOf as requireInstanceOf__134, pairConstructor as pairConstructor_88, mapConstructor as mapConstructor_87, regexCompileFormatted as regexCompileFormatted_100, regexCompiledFound as regexCompiledFound_104, regexCompiledFind as regexCompiledFind_109, regexCompiledReplace as regexCompiledReplace_114, regexCompiledSplit as regexCompiledSplit_117, listedGet as listedGet_169, stringFromCodePoint as stringFromCodePoint_171, regexFormatterPushCodeTo as regexFormatterPushCodeTo_172, stringGet as stringGet_180, stringNext as stringNext_181, regexFormatterAdjustCodeSet as regexFormatterAdjustCodeSet_195, listBuilderAdd as listBuilderAdd_304, listBuilderToList as listBuilderToList_305
|
|
3
3
|
} from "@temperlang/core";
|
|
4
4
|
export class RegexNode extends type__10() {
|
|
5
5
|
/** @returns {Regex} */
|
|
@@ -41,6 +41,16 @@ export class Capture extends type__10(RegexNode) {
|
|
|
41
41
|
#name_11;
|
|
42
42
|
/** @type {RegexNode} */
|
|
43
43
|
#item_12;
|
|
44
|
+
/**
|
|
45
|
+
* @param {{
|
|
46
|
+
* name: string, item: RegexNode
|
|
47
|
+
* }}
|
|
48
|
+
* props
|
|
49
|
+
* @returns {Capture}
|
|
50
|
+
*/
|
|
51
|
+
static["new"](props) {
|
|
52
|
+
return new Capture(props.name, props.item);
|
|
53
|
+
}
|
|
44
54
|
/**
|
|
45
55
|
* @param {string} name_13
|
|
46
56
|
* @param {RegexNode} item_14
|
|
@@ -85,6 +95,16 @@ export class CodeRange extends type__10(CodePart) {
|
|
|
85
95
|
#min_20;
|
|
86
96
|
/** @type {number} */
|
|
87
97
|
#max_21;
|
|
98
|
+
/**
|
|
99
|
+
* @param {{
|
|
100
|
+
* min: number, max: number
|
|
101
|
+
* }}
|
|
102
|
+
* props
|
|
103
|
+
* @returns {CodeRange}
|
|
104
|
+
*/
|
|
105
|
+
static["new"](props) {
|
|
106
|
+
return new CodeRange(props.min, props.max);
|
|
107
|
+
}
|
|
88
108
|
/**
|
|
89
109
|
* @param {number} min_22
|
|
90
110
|
* @param {number} max_23
|
|
@@ -104,986 +124,1035 @@ export class CodeRange extends type__10(CodePart) {
|
|
|
104
124
|
return this.#max_21;
|
|
105
125
|
}
|
|
106
126
|
};
|
|
107
|
-
|
|
108
|
-
export class ItemizedRegex extends type__10(RegexNode) {
|
|
109
|
-
};
|
|
110
|
-
export class CodeSet extends type__10(ItemizedRegex) {
|
|
127
|
+
export class CodeSet extends type__10(RegexNode) {
|
|
111
128
|
/** @type {Array<CodePart>} */
|
|
112
|
-
#
|
|
129
|
+
#items_26;
|
|
113
130
|
/** @type {boolean} */
|
|
114
|
-
#
|
|
131
|
+
#negated_27;
|
|
115
132
|
/**
|
|
116
|
-
* @param {
|
|
117
|
-
*
|
|
133
|
+
* @param {{
|
|
134
|
+
* items: Array<CodePart>, negated ?: boolean | null
|
|
135
|
+
* }}
|
|
136
|
+
* props
|
|
137
|
+
* @returns {CodeSet}
|
|
118
138
|
*/
|
|
119
|
-
|
|
139
|
+
static["new"](props) {
|
|
140
|
+
return new CodeSet(props.items, props.negated);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* @param {Array<CodePart>} items_28
|
|
144
|
+
* @param {boolean | null} [negated_29]
|
|
145
|
+
*/
|
|
146
|
+
constructor(items_28, negated_29) {
|
|
120
147
|
super ();
|
|
121
|
-
let
|
|
122
|
-
if (
|
|
123
|
-
|
|
148
|
+
let negated_30;
|
|
149
|
+
if (negated_29 == null) {
|
|
150
|
+
negated_30 = false;
|
|
124
151
|
} else {
|
|
125
|
-
|
|
152
|
+
negated_30 = negated_29;
|
|
126
153
|
}
|
|
127
|
-
this.#
|
|
128
|
-
this.#
|
|
154
|
+
this.#items_26 = items_28;
|
|
155
|
+
this.#negated_27 = negated_30;
|
|
129
156
|
return;
|
|
130
157
|
}
|
|
131
158
|
/** @returns {Array<CodePart>} */
|
|
132
159
|
get items() {
|
|
133
|
-
return this.#
|
|
160
|
+
return this.#items_26;
|
|
134
161
|
}
|
|
135
162
|
/** @returns {boolean} */
|
|
136
163
|
get negated() {
|
|
137
|
-
return this.#
|
|
164
|
+
return this.#negated_27;
|
|
138
165
|
}
|
|
139
166
|
};
|
|
140
|
-
export class Or extends type__10(
|
|
167
|
+
export class Or extends type__10(RegexNode) {
|
|
141
168
|
/** @type {Array<RegexNode>} */
|
|
142
|
-
#
|
|
143
|
-
/** @param {Array<RegexNode>}
|
|
144
|
-
constructor(
|
|
169
|
+
#items_33;
|
|
170
|
+
/** @param {Array<RegexNode>} items_34 */
|
|
171
|
+
constructor(items_34) {
|
|
145
172
|
super ();
|
|
146
|
-
this.#
|
|
173
|
+
this.#items_33 = items_34;
|
|
147
174
|
return;
|
|
148
175
|
}
|
|
149
176
|
/** @returns {Array<RegexNode>} */
|
|
150
177
|
get items() {
|
|
151
|
-
return this.#
|
|
178
|
+
return this.#items_33;
|
|
152
179
|
}
|
|
153
180
|
};
|
|
154
181
|
export class Repeat extends type__10(RegexNode) {
|
|
155
182
|
/** @type {RegexNode} */
|
|
156
|
-
#
|
|
183
|
+
#item_36;
|
|
157
184
|
/** @type {number} */
|
|
158
|
-
#
|
|
185
|
+
#min_37;
|
|
159
186
|
/** @type {number | null} */
|
|
160
|
-
#
|
|
187
|
+
#max_38;
|
|
161
188
|
/** @type {boolean} */
|
|
162
|
-
#
|
|
189
|
+
#reluctant_39;
|
|
163
190
|
/**
|
|
164
|
-
* @param {
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
191
|
+
* @param {{
|
|
192
|
+
* item: RegexNode, min: number, max: number | null, reluctant ?: boolean | null
|
|
193
|
+
* }}
|
|
194
|
+
* props
|
|
195
|
+
* @returns {Repeat}
|
|
168
196
|
*/
|
|
169
|
-
|
|
197
|
+
static["new"](props) {
|
|
198
|
+
return new Repeat(props.item, props.min, props.max, props.reluctant);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @param {RegexNode} item_40
|
|
202
|
+
* @param {number} min_41
|
|
203
|
+
* @param {number | null} max_42
|
|
204
|
+
* @param {boolean | null} [reluctant_43]
|
|
205
|
+
*/
|
|
206
|
+
constructor(item_40, min_41, max_42, reluctant_43) {
|
|
170
207
|
super ();
|
|
171
|
-
let
|
|
172
|
-
if (
|
|
173
|
-
|
|
208
|
+
let reluctant_44;
|
|
209
|
+
if (reluctant_43 == null) {
|
|
210
|
+
reluctant_44 = false;
|
|
174
211
|
} else {
|
|
175
|
-
|
|
212
|
+
reluctant_44 = reluctant_43;
|
|
176
213
|
}
|
|
177
|
-
this.#
|
|
178
|
-
this.#
|
|
179
|
-
this.#
|
|
180
|
-
this.#
|
|
214
|
+
this.#item_36 = item_40;
|
|
215
|
+
this.#min_37 = min_41;
|
|
216
|
+
this.#max_38 = max_42;
|
|
217
|
+
this.#reluctant_39 = reluctant_44;
|
|
181
218
|
return;
|
|
182
219
|
}
|
|
183
220
|
/** @returns {RegexNode} */
|
|
184
221
|
get item() {
|
|
185
|
-
return this.#
|
|
222
|
+
return this.#item_36;
|
|
186
223
|
}
|
|
187
224
|
/** @returns {number} */
|
|
188
225
|
get min() {
|
|
189
|
-
return this.#
|
|
226
|
+
return this.#min_37;
|
|
190
227
|
}
|
|
191
228
|
/** @returns {number | null} */
|
|
192
229
|
get max() {
|
|
193
|
-
return this.#
|
|
230
|
+
return this.#max_38;
|
|
194
231
|
}
|
|
195
232
|
/** @returns {boolean} */
|
|
196
233
|
get reluctant() {
|
|
197
|
-
return this.#
|
|
234
|
+
return this.#reluctant_39;
|
|
198
235
|
}
|
|
199
236
|
};
|
|
200
|
-
export class Sequence extends type__10(
|
|
237
|
+
export class Sequence extends type__10(RegexNode) {
|
|
201
238
|
/** @type {Array<RegexNode>} */
|
|
202
|
-
#
|
|
203
|
-
/** @param {Array<RegexNode>}
|
|
204
|
-
constructor(
|
|
239
|
+
#items_49;
|
|
240
|
+
/** @param {Array<RegexNode>} items_50 */
|
|
241
|
+
constructor(items_50) {
|
|
205
242
|
super ();
|
|
206
|
-
this.#
|
|
243
|
+
this.#items_49 = items_50;
|
|
207
244
|
return;
|
|
208
245
|
}
|
|
209
246
|
/** @returns {Array<RegexNode>} */
|
|
210
247
|
get items() {
|
|
211
|
-
return this.#
|
|
248
|
+
return this.#items_49;
|
|
212
249
|
}
|
|
213
250
|
};
|
|
214
251
|
export class Match extends type__10() {
|
|
215
252
|
/** @type {Group} */
|
|
216
|
-
#
|
|
253
|
+
#full_52;
|
|
217
254
|
/** @type {Map<string, Group>} */
|
|
218
|
-
#
|
|
255
|
+
#groups_53;
|
|
219
256
|
/**
|
|
220
|
-
* @param {
|
|
221
|
-
*
|
|
257
|
+
* @param {{
|
|
258
|
+
* full: Group, groups: Map<string, Group>
|
|
259
|
+
* }}
|
|
260
|
+
* props
|
|
261
|
+
* @returns {Match}
|
|
222
262
|
*/
|
|
223
|
-
|
|
263
|
+
static["new"](props) {
|
|
264
|
+
return new Match(props.full, props.groups);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* @param {Group} full_54
|
|
268
|
+
* @param {Map<string, Group>} groups_55
|
|
269
|
+
*/
|
|
270
|
+
constructor(full_54, groups_55) {
|
|
224
271
|
super ();
|
|
225
|
-
this.#
|
|
226
|
-
this.#
|
|
272
|
+
this.#full_52 = full_54;
|
|
273
|
+
this.#groups_53 = groups_55;
|
|
227
274
|
return;
|
|
228
275
|
}
|
|
229
276
|
/** @returns {Group} */
|
|
230
277
|
get full() {
|
|
231
|
-
return this.#
|
|
278
|
+
return this.#full_52;
|
|
232
279
|
}
|
|
233
280
|
/** @returns {Map<string, Group>} */
|
|
234
281
|
get groups() {
|
|
235
|
-
return this.#
|
|
282
|
+
return this.#groups_53;
|
|
236
283
|
}
|
|
237
284
|
};
|
|
238
285
|
export class Group extends type__10() {
|
|
239
286
|
/** @type {string} */
|
|
240
|
-
#
|
|
287
|
+
#name_58;
|
|
241
288
|
/** @type {string} */
|
|
242
|
-
#
|
|
289
|
+
#value_59;
|
|
243
290
|
/** @type {globalThis.number} */
|
|
244
|
-
#
|
|
291
|
+
#begin_60;
|
|
245
292
|
/** @type {globalThis.number} */
|
|
246
|
-
#
|
|
293
|
+
#end_61;
|
|
247
294
|
/**
|
|
248
|
-
* @param {
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
295
|
+
* @param {{
|
|
296
|
+
* name: string, value: string, begin: globalThis.number, end: globalThis.number
|
|
297
|
+
* }}
|
|
298
|
+
* props
|
|
299
|
+
* @returns {Group}
|
|
252
300
|
*/
|
|
253
|
-
|
|
301
|
+
static["new"](props) {
|
|
302
|
+
return new Group(props.name, props.value, props.begin, props.end);
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* @param {string} name_62
|
|
306
|
+
* @param {string} value_63
|
|
307
|
+
* @param {globalThis.number} begin_64
|
|
308
|
+
* @param {globalThis.number} end_65
|
|
309
|
+
*/
|
|
310
|
+
constructor(name_62, value_63, begin_64, end_65) {
|
|
254
311
|
super ();
|
|
255
|
-
this.#
|
|
256
|
-
this.#
|
|
257
|
-
this.#
|
|
258
|
-
this.#
|
|
312
|
+
this.#name_58 = name_62;
|
|
313
|
+
this.#value_59 = value_63;
|
|
314
|
+
this.#begin_60 = begin_64;
|
|
315
|
+
this.#end_61 = end_65;
|
|
259
316
|
return;
|
|
260
317
|
}
|
|
261
318
|
/** @returns {string} */
|
|
262
319
|
get name() {
|
|
263
|
-
return this.#
|
|
320
|
+
return this.#name_58;
|
|
264
321
|
}
|
|
265
322
|
/** @returns {string} */
|
|
266
323
|
get value() {
|
|
267
|
-
return this.#
|
|
324
|
+
return this.#value_59;
|
|
268
325
|
}
|
|
269
326
|
/** @returns {globalThis.number} */
|
|
270
327
|
get begin() {
|
|
271
|
-
return this.#
|
|
328
|
+
return this.#begin_60;
|
|
272
329
|
}
|
|
273
330
|
/** @returns {globalThis.number} */
|
|
274
331
|
get end() {
|
|
275
|
-
return this.#
|
|
332
|
+
return this.#end_61;
|
|
276
333
|
}
|
|
277
334
|
};
|
|
278
|
-
class
|
|
335
|
+
class RegexRefs_70 extends type__10() {
|
|
279
336
|
/** @type {CodePoints} */
|
|
280
|
-
#
|
|
337
|
+
#codePoints_71;
|
|
281
338
|
/** @type {Group} */
|
|
282
|
-
#
|
|
339
|
+
#group_72;
|
|
283
340
|
/** @type {Match} */
|
|
284
|
-
#
|
|
341
|
+
#match_73;
|
|
285
342
|
/** @type {Or} */
|
|
286
|
-
#
|
|
343
|
+
#orObject_74;
|
|
287
344
|
/**
|
|
288
|
-
* @param {
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
345
|
+
* @param {{
|
|
346
|
+
* codePoints ?: CodePoints | null, group ?: Group | null, match ?: Match | null, orObject ?: Or | null
|
|
347
|
+
* }}
|
|
348
|
+
* props
|
|
349
|
+
* @returns {RegexRefs_70}
|
|
292
350
|
*/
|
|
293
|
-
|
|
351
|
+
static["new"](props) {
|
|
352
|
+
return new RegexRefs_70(props.codePoints, props.group, props.match, props.orObject);
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* @param {CodePoints | null} [codePoints_75]
|
|
356
|
+
* @param {Group | null} [group_76]
|
|
357
|
+
* @param {Match | null} [match_77]
|
|
358
|
+
* @param {Or | null} [orObject_78]
|
|
359
|
+
*/
|
|
360
|
+
constructor(codePoints_75, group_76, match_77, orObject_78) {
|
|
294
361
|
super ();
|
|
362
|
+
let t_79;
|
|
363
|
+
let t_80;
|
|
295
364
|
let t_81;
|
|
296
365
|
let t_82;
|
|
297
366
|
let t_83;
|
|
298
|
-
let
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
t_81 = new CodePoints("");
|
|
303
|
-
codePoints_86 = t_81;
|
|
367
|
+
let codePoints_84;
|
|
368
|
+
if (codePoints_75 == null) {
|
|
369
|
+
t_79 = new CodePoints("");
|
|
370
|
+
codePoints_84 = t_79;
|
|
304
371
|
} else {
|
|
305
|
-
|
|
372
|
+
codePoints_84 = codePoints_75;
|
|
306
373
|
}
|
|
307
|
-
let
|
|
308
|
-
if (
|
|
309
|
-
|
|
310
|
-
|
|
374
|
+
let group_85;
|
|
375
|
+
if (group_76 == null) {
|
|
376
|
+
t_80 = new Group("", "", 0, 0);
|
|
377
|
+
group_85 = t_80;
|
|
311
378
|
} else {
|
|
312
|
-
|
|
379
|
+
group_85 = group_76;
|
|
313
380
|
}
|
|
314
|
-
let
|
|
315
|
-
if (
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
381
|
+
let match_86;
|
|
382
|
+
if (match_77 == null) {
|
|
383
|
+
t_81 = mapConstructor_87(Object.freeze([pairConstructor_88("", group_85)]));
|
|
384
|
+
t_82 = new Match(group_85, t_81);
|
|
385
|
+
match_86 = t_82;
|
|
319
386
|
} else {
|
|
320
|
-
|
|
387
|
+
match_86 = match_77;
|
|
321
388
|
}
|
|
322
|
-
let
|
|
323
|
-
if (
|
|
324
|
-
|
|
325
|
-
|
|
389
|
+
let orObject_89;
|
|
390
|
+
if (orObject_78 == null) {
|
|
391
|
+
t_83 = new Or(Object.freeze([]));
|
|
392
|
+
orObject_89 = t_83;
|
|
326
393
|
} else {
|
|
327
|
-
|
|
394
|
+
orObject_89 = orObject_78;
|
|
328
395
|
}
|
|
329
|
-
this.#
|
|
330
|
-
this.#
|
|
331
|
-
this.#
|
|
332
|
-
this.#
|
|
396
|
+
this.#codePoints_71 = codePoints_84;
|
|
397
|
+
this.#group_72 = group_85;
|
|
398
|
+
this.#match_73 = match_86;
|
|
399
|
+
this.#orObject_74 = orObject_89;
|
|
333
400
|
return;
|
|
334
401
|
}
|
|
335
402
|
/** @returns {CodePoints} */
|
|
336
403
|
get codePoints() {
|
|
337
|
-
return this.#
|
|
404
|
+
return this.#codePoints_71;
|
|
338
405
|
}
|
|
339
406
|
/** @returns {Group} */
|
|
340
407
|
get group() {
|
|
341
|
-
return this.#
|
|
408
|
+
return this.#group_72;
|
|
342
409
|
}
|
|
343
410
|
/** @returns {Match} */
|
|
344
411
|
get match() {
|
|
345
|
-
return this.#
|
|
412
|
+
return this.#match_73;
|
|
346
413
|
}
|
|
347
414
|
/** @returns {Or} */
|
|
348
415
|
get orObject() {
|
|
349
|
-
return this.#
|
|
416
|
+
return this.#orObject_74;
|
|
350
417
|
}
|
|
351
418
|
}
|
|
352
419
|
export class Regex extends type__10() {
|
|
353
420
|
/** @type {RegexNode} */
|
|
354
|
-
#
|
|
355
|
-
/** @param {RegexNode}
|
|
356
|
-
constructor(
|
|
421
|
+
#data_94;
|
|
422
|
+
/** @param {RegexNode} data_95 */
|
|
423
|
+
constructor(data_95) {
|
|
357
424
|
super ();
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
425
|
+
const t_96 = data_95;
|
|
426
|
+
this.#data_94 = t_96;
|
|
427
|
+
const formatted_97 = RegexFormatter_98.regexFormat(data_95);
|
|
428
|
+
let t_99 = regexCompileFormatted_100(data_95, formatted_97);
|
|
429
|
+
this.#compiled_101 = t_99;
|
|
362
430
|
return;
|
|
363
431
|
}
|
|
364
432
|
/**
|
|
365
|
-
* @param {string}
|
|
433
|
+
* @param {string} text_103
|
|
366
434
|
* @returns {boolean}
|
|
367
435
|
*/
|
|
368
|
-
found(
|
|
369
|
-
return
|
|
436
|
+
found(text_103) {
|
|
437
|
+
return regexCompiledFound_104(this, this.#compiled_101, text_103);
|
|
370
438
|
}
|
|
371
439
|
/**
|
|
372
|
-
* @param {string}
|
|
373
|
-
* @param {globalThis.number | null} [
|
|
440
|
+
* @param {string} text_106
|
|
441
|
+
* @param {globalThis.number | null} [begin_107]
|
|
374
442
|
* @returns {Match}
|
|
375
443
|
*/
|
|
376
|
-
find(
|
|
377
|
-
let
|
|
378
|
-
if (
|
|
379
|
-
|
|
444
|
+
find(text_106, begin_107) {
|
|
445
|
+
let begin_108;
|
|
446
|
+
if (begin_107 == null) {
|
|
447
|
+
begin_108 = 0;
|
|
380
448
|
} else {
|
|
381
|
-
|
|
449
|
+
begin_108 = begin_107;
|
|
382
450
|
}
|
|
383
|
-
return
|
|
451
|
+
return regexCompiledFind_109(this, this.#compiled_101, text_106, begin_108, regexRefs_110);
|
|
384
452
|
}
|
|
385
453
|
/**
|
|
386
|
-
* @param {string}
|
|
387
|
-
* @param {(arg0: Match) => string}
|
|
454
|
+
* @param {string} text_112
|
|
455
|
+
* @param {(arg0: Match) => string} format_113
|
|
388
456
|
* @returns {string}
|
|
389
457
|
*/
|
|
390
|
-
replace(
|
|
391
|
-
return
|
|
458
|
+
replace(text_112, format_113) {
|
|
459
|
+
return regexCompiledReplace_114(this, this.#compiled_101, text_112, format_113, regexRefs_110);
|
|
392
460
|
}
|
|
393
461
|
/**
|
|
394
|
-
* @param {string}
|
|
462
|
+
* @param {string} text_116
|
|
395
463
|
* @returns {Array<string>}
|
|
396
464
|
*/
|
|
397
|
-
split(
|
|
398
|
-
return
|
|
465
|
+
split(text_116) {
|
|
466
|
+
return regexCompiledSplit_117(this, this.#compiled_101, text_116, regexRefs_110);
|
|
399
467
|
}
|
|
400
468
|
/** @type {unknown} */
|
|
401
|
-
#
|
|
402
|
-
/** @returns {string} */
|
|
403
|
-
#format_99() {
|
|
404
|
-
return new RegexFormatter_120().format(this.#data_96);
|
|
405
|
-
}
|
|
469
|
+
#compiled_101;
|
|
406
470
|
/** @returns {RegexNode} */
|
|
407
471
|
get data() {
|
|
408
|
-
return this.#
|
|
472
|
+
return this.#data_94;
|
|
409
473
|
}
|
|
410
474
|
};
|
|
411
|
-
class
|
|
412
|
-
/** @type {Array<string>} */
|
|
413
|
-
#
|
|
475
|
+
class RegexFormatter_98 extends type__10() {
|
|
476
|
+
/** @type {globalThis.Array<string>} */
|
|
477
|
+
#out_119;
|
|
414
478
|
/**
|
|
415
|
-
* @param {RegexNode}
|
|
479
|
+
* @param {RegexNode} data_121
|
|
416
480
|
* @returns {string}
|
|
417
481
|
*/
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
function fn_126(x_127) {
|
|
421
|
-
return x_127;
|
|
422
|
-
}
|
|
423
|
-
return listedJoin_128(this.#out_122, "", fn_126);
|
|
482
|
+
static regexFormat(data_121) {
|
|
483
|
+
return new RegexFormatter_98().format(data_121);
|
|
424
484
|
}
|
|
425
|
-
/**
|
|
426
|
-
|
|
485
|
+
/**
|
|
486
|
+
* @param {RegexNode} regex_123
|
|
487
|
+
* @returns {string}
|
|
488
|
+
*/
|
|
489
|
+
format(regex_123) {
|
|
490
|
+
this.#pushRegex_124(regex_123);
|
|
491
|
+
return this.#out_119[0];
|
|
492
|
+
}
|
|
493
|
+
/** @param {RegexNode} regex_126 */
|
|
494
|
+
#pushRegex_124(regex_126) {
|
|
495
|
+
let t_127;
|
|
496
|
+
let t_128;
|
|
497
|
+
let t_129;
|
|
498
|
+
let t_130;
|
|
427
499
|
let t_131;
|
|
428
500
|
let t_132;
|
|
429
501
|
let t_133;
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
this.#
|
|
455
|
-
} else if (Object.is(
|
|
456
|
-
|
|
457
|
-
} else if (Object.is(
|
|
458
|
-
|
|
459
|
-
} else if (Object.is(
|
|
460
|
-
|
|
461
|
-
} else if (Object.is(
|
|
462
|
-
|
|
463
|
-
} else if (Object.is(
|
|
464
|
-
|
|
465
|
-
} else if (Object.is(regex_130, Space)) {
|
|
466
|
-
listBuilderAdd_146(this.#out_122, "\\s");
|
|
467
|
-
} else if (Object.is(regex_130, Word)) {
|
|
468
|
-
listBuilderAdd_146(this.#out_122, "\\w");
|
|
502
|
+
if (regex_126 instanceof Capture) {
|
|
503
|
+
t_127 = requireInstanceOf__134(regex_126, Capture);
|
|
504
|
+
this.#pushCapture_135(t_127);
|
|
505
|
+
} else if (regex_126 instanceof CodePoints) {
|
|
506
|
+
t_128 = requireInstanceOf__134(regex_126, CodePoints);
|
|
507
|
+
this.#pushCodePoints_136(t_128, false);
|
|
508
|
+
} else if (regex_126 instanceof CodeRange) {
|
|
509
|
+
t_129 = requireInstanceOf__134(regex_126, CodeRange);
|
|
510
|
+
this.#pushCodeRange_137(t_129);
|
|
511
|
+
} else if (regex_126 instanceof CodeSet) {
|
|
512
|
+
t_130 = requireInstanceOf__134(regex_126, CodeSet);
|
|
513
|
+
this.#pushCodeSet_138(t_130);
|
|
514
|
+
} else if (regex_126 instanceof Or) {
|
|
515
|
+
t_131 = requireInstanceOf__134(regex_126, Or);
|
|
516
|
+
this.#pushOr_139(t_131);
|
|
517
|
+
} else if (regex_126 instanceof Repeat) {
|
|
518
|
+
t_132 = requireInstanceOf__134(regex_126, Repeat);
|
|
519
|
+
this.#pushRepeat_140(t_132);
|
|
520
|
+
} else if (regex_126 instanceof Sequence) {
|
|
521
|
+
t_133 = requireInstanceOf__134(regex_126, Sequence);
|
|
522
|
+
this.#pushSequence_141(t_133);
|
|
523
|
+
} else if (Object.is(regex_126, Begin)) {
|
|
524
|
+
this.#out_119[0] += "^";
|
|
525
|
+
} else if (Object.is(regex_126, Dot)) {
|
|
526
|
+
this.#out_119[0] += ".";
|
|
527
|
+
} else if (Object.is(regex_126, End)) {
|
|
528
|
+
this.#out_119[0] += "\u0024";
|
|
529
|
+
} else if (Object.is(regex_126, WordBoundary)) {
|
|
530
|
+
this.#out_119[0] += "\\b";
|
|
531
|
+
} else if (Object.is(regex_126, Digit)) {
|
|
532
|
+
this.#out_119[0] += "\\d";
|
|
533
|
+
} else if (Object.is(regex_126, Space)) {
|
|
534
|
+
this.#out_119[0] += "\\s";
|
|
535
|
+
} else if (Object.is(regex_126, Word)) {
|
|
536
|
+
this.#out_119[0] += "\\w";
|
|
469
537
|
}
|
|
470
538
|
return;
|
|
471
539
|
}
|
|
472
|
-
/** @param {Capture}
|
|
473
|
-
#
|
|
474
|
-
|
|
475
|
-
let
|
|
476
|
-
let
|
|
477
|
-
this.#
|
|
478
|
-
let
|
|
479
|
-
this.#
|
|
480
|
-
|
|
540
|
+
/** @param {Capture} capture_143 */
|
|
541
|
+
#pushCapture_135(capture_143) {
|
|
542
|
+
this.#out_119[0] += "(";
|
|
543
|
+
let t_144 = this.#out_119;
|
|
544
|
+
let t_145 = capture_143.name;
|
|
545
|
+
this.#pushCaptureName_146(t_144, t_145);
|
|
546
|
+
let t_147 = capture_143.item;
|
|
547
|
+
this.#pushRegex_124(t_147);
|
|
548
|
+
this.#out_119[0] += ")";
|
|
481
549
|
return;
|
|
482
550
|
}
|
|
483
551
|
/**
|
|
484
|
-
* @param {Array<string>}
|
|
485
|
-
* @param {string}
|
|
552
|
+
* @param {globalThis.Array<string>} out_149
|
|
553
|
+
* @param {string} name_150
|
|
486
554
|
*/
|
|
487
|
-
#
|
|
488
|
-
|
|
555
|
+
#pushCaptureName_146(out_149, name_150) {
|
|
556
|
+
out_149[0] += "?\u003c" + name_150 + "\u003e";
|
|
489
557
|
return;
|
|
490
558
|
}
|
|
491
559
|
/**
|
|
492
|
-
* @param {number}
|
|
493
|
-
* @param {boolean}
|
|
560
|
+
* @param {number} code_153
|
|
561
|
+
* @param {boolean} insideCodeSet_154
|
|
494
562
|
*/
|
|
495
|
-
#
|
|
496
|
-
let
|
|
563
|
+
#pushCode_152(code_153, insideCodeSet_154) {
|
|
564
|
+
let return_155;
|
|
565
|
+
let t_156;
|
|
566
|
+
let t_157;
|
|
567
|
+
let t_158;
|
|
568
|
+
let t_159;
|
|
569
|
+
let t_160;
|
|
497
570
|
let t_161;
|
|
498
571
|
let t_162;
|
|
499
572
|
let t_163;
|
|
500
573
|
let t_164;
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
} else if (code_158 === Codes_172.newline) {
|
|
511
|
-
specialEscape_171 = "n";
|
|
512
|
-
} else if (code_158 === Codes_172.tab) {
|
|
513
|
-
specialEscape_171 = "t";
|
|
514
|
-
} else {
|
|
515
|
-
specialEscape_171 = "";
|
|
516
|
-
}
|
|
517
|
-
if (specialEscape_171 !== "") {
|
|
518
|
-
listBuilderAdd_146(this.#out_122, "\\");
|
|
519
|
-
listBuilderAdd_146(this.#out_122, specialEscape_171);
|
|
520
|
-
return_160 = void 0;
|
|
521
|
-
break fn_170;
|
|
522
|
-
}
|
|
523
|
-
if (code_158 <= 127) {
|
|
524
|
-
let escapeNeed_173;
|
|
525
|
-
escapeNeed_173 = listedGet_174(escapeNeeds_175, code_158);
|
|
526
|
-
if (escapeNeed_173 === 2) {
|
|
527
|
-
t_162 = true;
|
|
574
|
+
fn_165: {
|
|
575
|
+
try {
|
|
576
|
+
let specialEscape_166;
|
|
577
|
+
if (code_153 === Codes_167.carriageReturn) {
|
|
578
|
+
specialEscape_166 = "r";
|
|
579
|
+
} else if (code_153 === Codes_167.newline) {
|
|
580
|
+
specialEscape_166 = "n";
|
|
581
|
+
} else if (code_153 === Codes_167.tab) {
|
|
582
|
+
specialEscape_166 = "t";
|
|
528
583
|
} else {
|
|
529
|
-
|
|
530
|
-
t_161 = code_158 === Codes_172.dash;
|
|
531
|
-
} else {
|
|
532
|
-
t_161 = false;
|
|
533
|
-
}
|
|
534
|
-
t_162 = t_161;
|
|
584
|
+
specialEscape_166 = "";
|
|
535
585
|
}
|
|
536
|
-
if (
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
break fn_170;
|
|
542
|
-
} else if (escapeNeed_173 === 0) {
|
|
543
|
-
t_164 = String.fromCodePoint(code_158);
|
|
544
|
-
listBuilderAdd_146(this.#out_122, t_164);
|
|
545
|
-
return_160 = void 0;
|
|
546
|
-
break fn_170;
|
|
586
|
+
if (specialEscape_166 !== "") {
|
|
587
|
+
this.#out_119[0] += "\\";
|
|
588
|
+
this.#out_119[0] += specialEscape_166;
|
|
589
|
+
return_155 = void 0;
|
|
590
|
+
break fn_165;
|
|
547
591
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
if (code_158 > Codes_172.highControlMax) {
|
|
553
|
-
if (Codes_172.surrogateMin <= code_158) {
|
|
554
|
-
t_165 = code_158 <= Codes_172.surrogateMax;
|
|
592
|
+
if (code_153 <= 127) {
|
|
593
|
+
const escapeNeed_168 = listedGet_169(escapeNeeds_170, code_153);
|
|
594
|
+
if (escapeNeed_168 === 2) {
|
|
595
|
+
t_157 = true;
|
|
555
596
|
} else {
|
|
556
|
-
|
|
597
|
+
if (insideCodeSet_154) {
|
|
598
|
+
t_156 = code_153 === Codes_167.dash;
|
|
599
|
+
} else {
|
|
600
|
+
t_156 = false;
|
|
601
|
+
}
|
|
602
|
+
t_157 = t_156;
|
|
557
603
|
}
|
|
558
|
-
if (
|
|
559
|
-
|
|
604
|
+
if (t_157) {
|
|
605
|
+
this.#out_119[0] += "\\";
|
|
606
|
+
t_158 = stringFromCodePoint_171(code_153);
|
|
607
|
+
this.#out_119[0] += t_158;
|
|
608
|
+
return_155 = void 0;
|
|
609
|
+
break fn_165;
|
|
610
|
+
} else if (escapeNeed_168 === 0) {
|
|
611
|
+
t_159 = stringFromCodePoint_171(code_153);
|
|
612
|
+
this.#out_119[0] += t_159;
|
|
613
|
+
return_155 = void 0;
|
|
614
|
+
break fn_165;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
if (code_153 >= Codes_167.supplementalMin) {
|
|
618
|
+
t_163 = true;
|
|
619
|
+
} else {
|
|
620
|
+
if (code_153 > Codes_167.highControlMax) {
|
|
621
|
+
if (Codes_167.surrogateMin <= code_153) {
|
|
622
|
+
t_160 = code_153 <= Codes_167.surrogateMax;
|
|
623
|
+
} else {
|
|
624
|
+
t_160 = false;
|
|
625
|
+
}
|
|
626
|
+
if (t_160) {
|
|
627
|
+
t_161 = true;
|
|
628
|
+
} else {
|
|
629
|
+
t_161 = code_153 === Codes_167.uint16Max;
|
|
630
|
+
}
|
|
631
|
+
t_162 = ! t_161;
|
|
560
632
|
} else {
|
|
561
|
-
|
|
633
|
+
t_162 = false;
|
|
562
634
|
}
|
|
563
|
-
|
|
635
|
+
t_163 = t_162;
|
|
636
|
+
}
|
|
637
|
+
if (t_163) {
|
|
638
|
+
t_164 = stringFromCodePoint_171(code_153);
|
|
639
|
+
this.#out_119[0] += t_164;
|
|
564
640
|
} else {
|
|
565
|
-
|
|
641
|
+
regexFormatterPushCodeTo_172(this, this.#out_119, code_153, insideCodeSet_154);
|
|
566
642
|
}
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
if (t_168) {
|
|
570
|
-
t_169 = String.fromCodePoint(code_158);
|
|
571
|
-
listBuilderAdd_146(this.#out_122, t_169);
|
|
572
|
-
} else {
|
|
573
|
-
regexFormatterPushCodeTo_176(this, this.#out_122, code_158, insideCodeSet_159);
|
|
643
|
+
} catch {
|
|
644
|
+
throw Error();
|
|
574
645
|
}
|
|
575
|
-
|
|
646
|
+
return_155 = void 0;
|
|
576
647
|
}
|
|
577
|
-
return
|
|
648
|
+
return return_155;
|
|
578
649
|
}
|
|
579
650
|
/**
|
|
580
|
-
* @param {CodePoints}
|
|
581
|
-
* @param {boolean}
|
|
651
|
+
* @param {CodePoints} codePoints_174
|
|
652
|
+
* @param {boolean} insideCodeSet_175
|
|
582
653
|
*/
|
|
583
|
-
#
|
|
584
|
-
let
|
|
585
|
-
let
|
|
586
|
-
const
|
|
587
|
-
let
|
|
654
|
+
#pushCodePoints_136(codePoints_174, insideCodeSet_175) {
|
|
655
|
+
let t_176;
|
|
656
|
+
let t_177;
|
|
657
|
+
const value_178 = codePoints_174.value;
|
|
658
|
+
let index_179 = 0;
|
|
588
659
|
while (true) {
|
|
589
|
-
if (!(
|
|
660
|
+
if (!(value_178.length > index_179)) {
|
|
590
661
|
break;
|
|
591
662
|
}
|
|
592
|
-
|
|
593
|
-
this.#
|
|
594
|
-
|
|
595
|
-
|
|
663
|
+
t_176 = stringGet_180(value_178, index_179);
|
|
664
|
+
this.#pushCode_152(t_176, insideCodeSet_175);
|
|
665
|
+
t_177 = stringNext_181(value_178, index_179);
|
|
666
|
+
index_179 = t_177;
|
|
596
667
|
}
|
|
597
668
|
return;
|
|
598
669
|
}
|
|
599
|
-
/** @param {CodeRange}
|
|
600
|
-
#
|
|
601
|
-
|
|
602
|
-
this.#
|
|
603
|
-
|
|
670
|
+
/** @param {CodeRange} codeRange_183 */
|
|
671
|
+
#pushCodeRange_137(codeRange_183) {
|
|
672
|
+
this.#out_119[0] += "[";
|
|
673
|
+
this.#pushCodeRangeUnwrapped_184(codeRange_183);
|
|
674
|
+
this.#out_119[0] += "]";
|
|
604
675
|
return;
|
|
605
676
|
}
|
|
606
|
-
/** @param {CodeRange}
|
|
607
|
-
#
|
|
608
|
-
let
|
|
609
|
-
this.#
|
|
610
|
-
|
|
611
|
-
let
|
|
612
|
-
this.#
|
|
677
|
+
/** @param {CodeRange} codeRange_186 */
|
|
678
|
+
#pushCodeRangeUnwrapped_184(codeRange_186) {
|
|
679
|
+
let t_187 = codeRange_186.min;
|
|
680
|
+
this.#pushCode_152(t_187, true);
|
|
681
|
+
this.#out_119[0] += "-";
|
|
682
|
+
let t_188 = codeRange_186.max;
|
|
683
|
+
this.#pushCode_152(t_188, true);
|
|
613
684
|
return;
|
|
614
685
|
}
|
|
615
|
-
/** @param {CodeSet}
|
|
616
|
-
#
|
|
617
|
-
let
|
|
618
|
-
let
|
|
619
|
-
let
|
|
620
|
-
const
|
|
621
|
-
if (
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
if (
|
|
625
|
-
|
|
686
|
+
/** @param {CodeSet} codeSet_190 */
|
|
687
|
+
#pushCodeSet_138(codeSet_190) {
|
|
688
|
+
let t_191;
|
|
689
|
+
let t_192;
|
|
690
|
+
let t_193;
|
|
691
|
+
const adjusted_194 = regexFormatterAdjustCodeSet_195(this, codeSet_190, regexRefs_110);
|
|
692
|
+
if (adjusted_194 instanceof CodeSet) {
|
|
693
|
+
t_193 = requireInstanceOf__134(adjusted_194, CodeSet);
|
|
694
|
+
this.#out_119[0] += "[";
|
|
695
|
+
if (t_193.negated) {
|
|
696
|
+
this.#out_119[0] += "^";
|
|
626
697
|
}
|
|
627
|
-
let
|
|
698
|
+
let i_196 = 0;
|
|
628
699
|
while (true) {
|
|
629
|
-
|
|
630
|
-
if (!(
|
|
700
|
+
t_191 = t_193.items.length;
|
|
701
|
+
if (!(i_196 < t_191)) {
|
|
631
702
|
break;
|
|
632
703
|
}
|
|
633
|
-
|
|
634
|
-
this.#
|
|
635
|
-
|
|
704
|
+
t_192 = listedGet_169(t_193.items, i_196);
|
|
705
|
+
this.#pushCodeSetItem_197(t_192);
|
|
706
|
+
i_196 = i_196 + 1;
|
|
636
707
|
}
|
|
637
|
-
|
|
708
|
+
this.#out_119[0] += "]";
|
|
638
709
|
} else {
|
|
639
|
-
this.#
|
|
710
|
+
this.#pushRegex_124(adjusted_194);
|
|
640
711
|
}
|
|
641
712
|
return;
|
|
642
713
|
}
|
|
643
|
-
/** @param {CodePart}
|
|
644
|
-
#
|
|
645
|
-
let
|
|
646
|
-
let
|
|
647
|
-
let
|
|
648
|
-
if (
|
|
649
|
-
|
|
650
|
-
this.#
|
|
651
|
-
} else if (
|
|
652
|
-
|
|
653
|
-
this.#
|
|
654
|
-
} else if (
|
|
655
|
-
|
|
656
|
-
this.#
|
|
714
|
+
/** @param {CodePart} codePart_199 */
|
|
715
|
+
#pushCodeSetItem_197(codePart_199) {
|
|
716
|
+
let t_200;
|
|
717
|
+
let t_201;
|
|
718
|
+
let t_202;
|
|
719
|
+
if (codePart_199 instanceof CodePoints) {
|
|
720
|
+
t_200 = requireInstanceOf__134(codePart_199, CodePoints);
|
|
721
|
+
this.#pushCodePoints_136(t_200, true);
|
|
722
|
+
} else if (codePart_199 instanceof CodeRange) {
|
|
723
|
+
t_201 = requireInstanceOf__134(codePart_199, CodeRange);
|
|
724
|
+
this.#pushCodeRangeUnwrapped_184(t_201);
|
|
725
|
+
} else if (codePart_199 instanceof SpecialSet) {
|
|
726
|
+
t_202 = requireInstanceOf__134(codePart_199, SpecialSet);
|
|
727
|
+
this.#pushRegex_124(t_202);
|
|
657
728
|
}
|
|
658
729
|
return;
|
|
659
730
|
}
|
|
660
|
-
/** @param {Or}
|
|
661
|
-
#
|
|
662
|
-
let
|
|
663
|
-
let
|
|
664
|
-
let
|
|
665
|
-
if (! !
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
this.#
|
|
669
|
-
let
|
|
731
|
+
/** @param {Or} or_204 */
|
|
732
|
+
#pushOr_139(or_204) {
|
|
733
|
+
let t_205;
|
|
734
|
+
let t_206;
|
|
735
|
+
let t_207;
|
|
736
|
+
if (! ! or_204.items.length) {
|
|
737
|
+
this.#out_119[0] += "(?:";
|
|
738
|
+
t_205 = listedGet_169(or_204.items, 0);
|
|
739
|
+
this.#pushRegex_124(t_205);
|
|
740
|
+
let i_208 = 1;
|
|
670
741
|
while (true) {
|
|
671
|
-
|
|
672
|
-
if (!(
|
|
742
|
+
t_206 = or_204.items.length;
|
|
743
|
+
if (!(i_208 < t_206)) {
|
|
673
744
|
break;
|
|
674
745
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
this.#
|
|
678
|
-
|
|
746
|
+
this.#out_119[0] += "|";
|
|
747
|
+
t_207 = listedGet_169(or_204.items, i_208);
|
|
748
|
+
this.#pushRegex_124(t_207);
|
|
749
|
+
i_208 = i_208 + 1;
|
|
679
750
|
}
|
|
680
|
-
|
|
751
|
+
this.#out_119[0] += ")";
|
|
681
752
|
}
|
|
682
753
|
return;
|
|
683
754
|
}
|
|
684
|
-
/** @param {Repeat}
|
|
685
|
-
#
|
|
755
|
+
/** @param {Repeat} repeat_210 */
|
|
756
|
+
#pushRepeat_140(repeat_210) {
|
|
757
|
+
let t_211;
|
|
758
|
+
let t_212;
|
|
759
|
+
let t_213;
|
|
760
|
+
let t_214;
|
|
686
761
|
let t_215;
|
|
687
|
-
|
|
688
|
-
let
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
const min_221 = repeat_214.min;
|
|
696
|
-
let max_222;
|
|
697
|
-
max_222 = repeat_214.max;
|
|
698
|
-
if (min_221 === 0) {
|
|
699
|
-
t_217 = max_222 === 1;
|
|
762
|
+
this.#out_119[0] += "(?:";
|
|
763
|
+
let t_216 = repeat_210.item;
|
|
764
|
+
this.#pushRegex_124(t_216);
|
|
765
|
+
this.#out_119[0] += ")";
|
|
766
|
+
const min_217 = repeat_210.min;
|
|
767
|
+
const max_218 = repeat_210.max;
|
|
768
|
+
if (min_217 === 0) {
|
|
769
|
+
t_213 = max_218 === 1;
|
|
700
770
|
} else {
|
|
701
|
-
|
|
771
|
+
t_213 = false;
|
|
702
772
|
}
|
|
703
|
-
if (
|
|
704
|
-
|
|
773
|
+
if (t_213) {
|
|
774
|
+
this.#out_119[0] += "?";
|
|
705
775
|
} else {
|
|
706
|
-
if (
|
|
707
|
-
|
|
776
|
+
if (min_217 === 0) {
|
|
777
|
+
t_214 = max_218 == null;
|
|
708
778
|
} else {
|
|
709
|
-
|
|
779
|
+
t_214 = false;
|
|
710
780
|
}
|
|
711
|
-
if (
|
|
712
|
-
|
|
781
|
+
if (t_214) {
|
|
782
|
+
this.#out_119[0] += "*";
|
|
713
783
|
} else {
|
|
714
|
-
if (
|
|
715
|
-
|
|
784
|
+
if (min_217 === 1) {
|
|
785
|
+
t_215 = max_218 == null;
|
|
716
786
|
} else {
|
|
717
|
-
|
|
787
|
+
t_215 = false;
|
|
718
788
|
}
|
|
719
|
-
if (
|
|
720
|
-
|
|
789
|
+
if (t_215) {
|
|
790
|
+
this.#out_119[0] += "+";
|
|
721
791
|
} else {
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
if (
|
|
725
|
-
|
|
726
|
-
if (!(
|
|
727
|
-
|
|
728
|
-
|
|
792
|
+
t_211 = min_217.toString();
|
|
793
|
+
this.#out_119[0] += "{" + t_211;
|
|
794
|
+
if (min_217 !== max_218) {
|
|
795
|
+
this.#out_119[0] += ",";
|
|
796
|
+
if (!(max_218 == null)) {
|
|
797
|
+
t_212 = max_218.toString();
|
|
798
|
+
this.#out_119[0] += t_212;
|
|
729
799
|
}
|
|
730
800
|
}
|
|
731
|
-
|
|
801
|
+
this.#out_119[0] += "}";
|
|
732
802
|
}
|
|
733
803
|
}
|
|
734
804
|
}
|
|
735
|
-
if (
|
|
736
|
-
|
|
805
|
+
if (repeat_210.reluctant) {
|
|
806
|
+
this.#out_119[0] += "?";
|
|
737
807
|
}
|
|
738
808
|
return;
|
|
739
809
|
}
|
|
740
|
-
/** @param {Sequence}
|
|
741
|
-
#
|
|
742
|
-
let
|
|
743
|
-
let
|
|
744
|
-
let
|
|
810
|
+
/** @param {Sequence} sequence_220 */
|
|
811
|
+
#pushSequence_141(sequence_220) {
|
|
812
|
+
let t_221;
|
|
813
|
+
let t_222;
|
|
814
|
+
let i_223 = 0;
|
|
745
815
|
while (true) {
|
|
746
|
-
|
|
747
|
-
if (!(
|
|
816
|
+
t_221 = sequence_220.items.length;
|
|
817
|
+
if (!(i_223 < t_221)) {
|
|
748
818
|
break;
|
|
749
819
|
}
|
|
750
|
-
|
|
751
|
-
this.#
|
|
752
|
-
|
|
820
|
+
t_222 = listedGet_169(sequence_220.items, i_223);
|
|
821
|
+
this.#pushRegex_124(t_222);
|
|
822
|
+
i_223 = i_223 + 1;
|
|
753
823
|
}
|
|
754
824
|
return;
|
|
755
825
|
}
|
|
756
826
|
/**
|
|
757
|
-
* @param {CodePart}
|
|
827
|
+
* @param {CodePart} codePart_225
|
|
758
828
|
* @returns {number | null}
|
|
759
829
|
*/
|
|
760
|
-
maxCode(
|
|
761
|
-
let
|
|
762
|
-
let
|
|
763
|
-
let
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
const value_236 = t_233.value;
|
|
770
|
-
if (! value_236) {
|
|
771
|
-
return_230 = null;
|
|
830
|
+
maxCode(codePart_225) {
|
|
831
|
+
let return_226;
|
|
832
|
+
let t_227;
|
|
833
|
+
let t_228;
|
|
834
|
+
if (codePart_225 instanceof CodePoints) {
|
|
835
|
+
t_228 = requireInstanceOf__134(codePart_225, CodePoints);
|
|
836
|
+
const value_229 = t_228.value;
|
|
837
|
+
if (! value_229) {
|
|
838
|
+
return_226 = null;
|
|
772
839
|
} else {
|
|
773
|
-
let
|
|
774
|
-
let
|
|
840
|
+
let max_230 = 0;
|
|
841
|
+
let index_231 = 0;
|
|
775
842
|
while (true) {
|
|
776
|
-
if (!(
|
|
843
|
+
if (!(value_229.length > index_231)) {
|
|
777
844
|
break;
|
|
778
845
|
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
max_237 = next_239;
|
|
846
|
+
const next_232 = stringGet_180(value_229, index_231);
|
|
847
|
+
if (next_232 > max_230) {
|
|
848
|
+
max_230 = next_232;
|
|
783
849
|
}
|
|
784
|
-
|
|
785
|
-
|
|
850
|
+
t_227 = stringNext_181(value_229, index_231);
|
|
851
|
+
index_231 = t_227;
|
|
786
852
|
}
|
|
787
|
-
|
|
853
|
+
return_226 = max_230;
|
|
788
854
|
}
|
|
789
|
-
} else if (
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
} else if (Object.is(
|
|
794
|
-
|
|
795
|
-
} else if (Object.is(
|
|
796
|
-
|
|
797
|
-
} else if (Object.is(codePart_229, Word)) {
|
|
798
|
-
return_230 = Codes_172.lowerZ;
|
|
855
|
+
} else if (codePart_225 instanceof CodeRange) {
|
|
856
|
+
return_226 = requireInstanceOf__134(codePart_225, CodeRange).max;
|
|
857
|
+
} else if (Object.is(codePart_225, Digit)) {
|
|
858
|
+
return_226 = Codes_167.digit9;
|
|
859
|
+
} else if (Object.is(codePart_225, Space)) {
|
|
860
|
+
return_226 = Codes_167.space;
|
|
861
|
+
} else if (Object.is(codePart_225, Word)) {
|
|
862
|
+
return_226 = Codes_167.lowerZ;
|
|
799
863
|
} else {
|
|
800
|
-
|
|
864
|
+
return_226 = null;
|
|
801
865
|
}
|
|
802
|
-
return
|
|
866
|
+
return return_226;
|
|
803
867
|
}
|
|
804
868
|
constructor() {
|
|
805
869
|
super ();
|
|
806
|
-
let
|
|
807
|
-
this.#
|
|
870
|
+
let t_233 = [""];
|
|
871
|
+
this.#out_119 = t_233;
|
|
808
872
|
return;
|
|
809
873
|
}
|
|
810
874
|
}
|
|
811
|
-
class
|
|
875
|
+
class Codes_167 extends type__10() {
|
|
812
876
|
/** @type {number} */
|
|
813
|
-
static #
|
|
877
|
+
static #ampersand_234 = 38;
|
|
814
878
|
/** @returns {number} */
|
|
815
879
|
static get ampersand() {
|
|
816
|
-
return this.#
|
|
880
|
+
return this.#ampersand_234;
|
|
817
881
|
}
|
|
818
882
|
/** @type {number} */
|
|
819
|
-
static #
|
|
883
|
+
static #backslash_235 = 92;
|
|
820
884
|
/** @returns {number} */
|
|
821
885
|
static get backslash() {
|
|
822
|
-
return this.#
|
|
886
|
+
return this.#backslash_235;
|
|
823
887
|
}
|
|
824
888
|
/** @type {number} */
|
|
825
|
-
static #
|
|
889
|
+
static #caret_236 = 94;
|
|
826
890
|
/** @returns {number} */
|
|
827
891
|
static get caret() {
|
|
828
|
-
return this.#
|
|
892
|
+
return this.#caret_236;
|
|
829
893
|
}
|
|
830
894
|
/** @type {number} */
|
|
831
|
-
static #
|
|
895
|
+
static #carriageReturn_237 = 13;
|
|
832
896
|
/** @returns {number} */
|
|
833
897
|
static get carriageReturn() {
|
|
834
|
-
return this.#
|
|
898
|
+
return this.#carriageReturn_237;
|
|
835
899
|
}
|
|
836
900
|
/** @type {number} */
|
|
837
|
-
static #
|
|
901
|
+
static #curlyLeft_238 = 123;
|
|
838
902
|
/** @returns {number} */
|
|
839
903
|
static get curlyLeft() {
|
|
840
|
-
return this.#
|
|
904
|
+
return this.#curlyLeft_238;
|
|
841
905
|
}
|
|
842
906
|
/** @type {number} */
|
|
843
|
-
static #
|
|
907
|
+
static #curlyRight_239 = 125;
|
|
844
908
|
/** @returns {number} */
|
|
845
909
|
static get curlyRight() {
|
|
846
|
-
return this.#
|
|
910
|
+
return this.#curlyRight_239;
|
|
847
911
|
}
|
|
848
912
|
/** @type {number} */
|
|
849
|
-
static #
|
|
913
|
+
static #dash_240 = 45;
|
|
850
914
|
/** @returns {number} */
|
|
851
915
|
static get dash() {
|
|
852
|
-
return this.#
|
|
916
|
+
return this.#dash_240;
|
|
853
917
|
}
|
|
854
918
|
/** @type {number} */
|
|
855
|
-
static #
|
|
919
|
+
static #dot_241 = 46;
|
|
856
920
|
/** @returns {number} */
|
|
857
921
|
static get dot() {
|
|
858
|
-
return this.#
|
|
922
|
+
return this.#dot_241;
|
|
859
923
|
}
|
|
860
924
|
/** @type {number} */
|
|
861
|
-
static #
|
|
925
|
+
static #highControlMin_242 = 127;
|
|
862
926
|
/** @returns {number} */
|
|
863
927
|
static get highControlMin() {
|
|
864
|
-
return this.#
|
|
928
|
+
return this.#highControlMin_242;
|
|
865
929
|
}
|
|
866
930
|
/** @type {number} */
|
|
867
|
-
static #
|
|
931
|
+
static #highControlMax_243 = 159;
|
|
868
932
|
/** @returns {number} */
|
|
869
933
|
static get highControlMax() {
|
|
870
|
-
return this.#
|
|
934
|
+
return this.#highControlMax_243;
|
|
871
935
|
}
|
|
872
936
|
/** @type {number} */
|
|
873
|
-
static #
|
|
937
|
+
static #digit0_244 = 48;
|
|
874
938
|
/** @returns {number} */
|
|
875
939
|
static get digit0() {
|
|
876
|
-
return this.#
|
|
940
|
+
return this.#digit0_244;
|
|
877
941
|
}
|
|
878
942
|
/** @type {number} */
|
|
879
|
-
static #
|
|
943
|
+
static #digit9_245 = 57;
|
|
880
944
|
/** @returns {number} */
|
|
881
945
|
static get digit9() {
|
|
882
|
-
return this.#
|
|
946
|
+
return this.#digit9_245;
|
|
883
947
|
}
|
|
884
948
|
/** @type {number} */
|
|
885
|
-
static #
|
|
949
|
+
static #lowerA_246 = 97;
|
|
886
950
|
/** @returns {number} */
|
|
887
951
|
static get lowerA() {
|
|
888
|
-
return this.#
|
|
952
|
+
return this.#lowerA_246;
|
|
889
953
|
}
|
|
890
954
|
/** @type {number} */
|
|
891
|
-
static #
|
|
955
|
+
static #lowerZ_247 = 122;
|
|
892
956
|
/** @returns {number} */
|
|
893
957
|
static get lowerZ() {
|
|
894
|
-
return this.#
|
|
958
|
+
return this.#lowerZ_247;
|
|
895
959
|
}
|
|
896
960
|
/** @type {number} */
|
|
897
|
-
static #
|
|
961
|
+
static #newline_248 = 10;
|
|
898
962
|
/** @returns {number} */
|
|
899
963
|
static get newline() {
|
|
900
|
-
return this.#
|
|
964
|
+
return this.#newline_248;
|
|
901
965
|
}
|
|
902
966
|
/** @type {number} */
|
|
903
|
-
static #
|
|
967
|
+
static #peso_249 = 36;
|
|
904
968
|
/** @returns {number} */
|
|
905
969
|
static get peso() {
|
|
906
|
-
return this.#
|
|
970
|
+
return this.#peso_249;
|
|
907
971
|
}
|
|
908
972
|
/** @type {number} */
|
|
909
|
-
static #
|
|
973
|
+
static #pipe_250 = 124;
|
|
910
974
|
/** @returns {number} */
|
|
911
975
|
static get pipe() {
|
|
912
|
-
return this.#
|
|
976
|
+
return this.#pipe_250;
|
|
913
977
|
}
|
|
914
978
|
/** @type {number} */
|
|
915
|
-
static #
|
|
979
|
+
static #plus_251 = 43;
|
|
916
980
|
/** @returns {number} */
|
|
917
981
|
static get plus() {
|
|
918
|
-
return this.#
|
|
982
|
+
return this.#plus_251;
|
|
919
983
|
}
|
|
920
984
|
/** @type {number} */
|
|
921
|
-
static #
|
|
985
|
+
static #question_252 = 63;
|
|
922
986
|
/** @returns {number} */
|
|
923
987
|
static get question() {
|
|
924
|
-
return this.#
|
|
988
|
+
return this.#question_252;
|
|
925
989
|
}
|
|
926
990
|
/** @type {number} */
|
|
927
|
-
static #
|
|
991
|
+
static #roundLeft_253 = 40;
|
|
928
992
|
/** @returns {number} */
|
|
929
993
|
static get roundLeft() {
|
|
930
|
-
return this.#
|
|
994
|
+
return this.#roundLeft_253;
|
|
931
995
|
}
|
|
932
996
|
/** @type {number} */
|
|
933
|
-
static #
|
|
997
|
+
static #roundRight_254 = 41;
|
|
934
998
|
/** @returns {number} */
|
|
935
999
|
static get roundRight() {
|
|
936
|
-
return this.#
|
|
1000
|
+
return this.#roundRight_254;
|
|
937
1001
|
}
|
|
938
1002
|
/** @type {number} */
|
|
939
|
-
static #
|
|
1003
|
+
static #slash_255 = 47;
|
|
940
1004
|
/** @returns {number} */
|
|
941
1005
|
static get slash() {
|
|
942
|
-
return this.#
|
|
1006
|
+
return this.#slash_255;
|
|
943
1007
|
}
|
|
944
1008
|
/** @type {number} */
|
|
945
|
-
static #
|
|
1009
|
+
static #squareLeft_256 = 91;
|
|
946
1010
|
/** @returns {number} */
|
|
947
1011
|
static get squareLeft() {
|
|
948
|
-
return this.#
|
|
1012
|
+
return this.#squareLeft_256;
|
|
949
1013
|
}
|
|
950
1014
|
/** @type {number} */
|
|
951
|
-
static #
|
|
1015
|
+
static #squareRight_257 = 93;
|
|
952
1016
|
/** @returns {number} */
|
|
953
1017
|
static get squareRight() {
|
|
954
|
-
return this.#
|
|
1018
|
+
return this.#squareRight_257;
|
|
955
1019
|
}
|
|
956
1020
|
/** @type {number} */
|
|
957
|
-
static #
|
|
1021
|
+
static #star_258 = 42;
|
|
958
1022
|
/** @returns {number} */
|
|
959
1023
|
static get star() {
|
|
960
|
-
return this.#
|
|
1024
|
+
return this.#star_258;
|
|
961
1025
|
}
|
|
962
1026
|
/** @type {number} */
|
|
963
|
-
static #
|
|
1027
|
+
static #tab_259 = 9;
|
|
964
1028
|
/** @returns {number} */
|
|
965
1029
|
static get tab() {
|
|
966
|
-
return this.#
|
|
1030
|
+
return this.#tab_259;
|
|
967
1031
|
}
|
|
968
1032
|
/** @type {number} */
|
|
969
|
-
static #
|
|
1033
|
+
static #tilde_260 = 42;
|
|
970
1034
|
/** @returns {number} */
|
|
971
1035
|
static get tilde() {
|
|
972
|
-
return this.#
|
|
1036
|
+
return this.#tilde_260;
|
|
973
1037
|
}
|
|
974
1038
|
/** @type {number} */
|
|
975
|
-
static #
|
|
1039
|
+
static #upperA_261 = 65;
|
|
976
1040
|
/** @returns {number} */
|
|
977
1041
|
static get upperA() {
|
|
978
|
-
return this.#
|
|
1042
|
+
return this.#upperA_261;
|
|
979
1043
|
}
|
|
980
1044
|
/** @type {number} */
|
|
981
|
-
static #
|
|
1045
|
+
static #upperZ_262 = 90;
|
|
982
1046
|
/** @returns {number} */
|
|
983
1047
|
static get upperZ() {
|
|
984
|
-
return this.#
|
|
1048
|
+
return this.#upperZ_262;
|
|
985
1049
|
}
|
|
986
1050
|
/** @type {number} */
|
|
987
|
-
static #
|
|
1051
|
+
static #space_263 = 32;
|
|
988
1052
|
/** @returns {number} */
|
|
989
1053
|
static get space() {
|
|
990
|
-
return this.#
|
|
1054
|
+
return this.#space_263;
|
|
991
1055
|
}
|
|
992
1056
|
/** @type {number} */
|
|
993
|
-
static #
|
|
1057
|
+
static #surrogateMin_264 = 55296;
|
|
994
1058
|
/** @returns {number} */
|
|
995
1059
|
static get surrogateMin() {
|
|
996
|
-
return this.#
|
|
1060
|
+
return this.#surrogateMin_264;
|
|
997
1061
|
}
|
|
998
1062
|
/** @type {number} */
|
|
999
|
-
static #
|
|
1063
|
+
static #surrogateMax_265 = 57343;
|
|
1000
1064
|
/** @returns {number} */
|
|
1001
1065
|
static get surrogateMax() {
|
|
1002
|
-
return this.#
|
|
1066
|
+
return this.#surrogateMax_265;
|
|
1003
1067
|
}
|
|
1004
1068
|
/** @type {number} */
|
|
1005
|
-
static #
|
|
1069
|
+
static #supplementalMin_266 = 65536;
|
|
1006
1070
|
/** @returns {number} */
|
|
1007
1071
|
static get supplementalMin() {
|
|
1008
|
-
return this.#
|
|
1072
|
+
return this.#supplementalMin_266;
|
|
1009
1073
|
}
|
|
1010
1074
|
/** @type {number} */
|
|
1011
|
-
static #
|
|
1075
|
+
static #uint16Max_267 = 65535;
|
|
1012
1076
|
/** @returns {number} */
|
|
1013
1077
|
static get uint16Max() {
|
|
1014
|
-
return this.#
|
|
1078
|
+
return this.#uint16Max_267;
|
|
1015
1079
|
}
|
|
1016
1080
|
/** @type {number} */
|
|
1017
|
-
static #
|
|
1081
|
+
static #underscore_268 = 95;
|
|
1018
1082
|
/** @returns {number} */
|
|
1019
1083
|
static get underscore() {
|
|
1020
|
-
return this.#
|
|
1084
|
+
return this.#underscore_268;
|
|
1021
1085
|
}
|
|
1022
1086
|
constructor() {
|
|
1023
1087
|
super ();
|
|
1024
1088
|
return;
|
|
1025
1089
|
}
|
|
1026
1090
|
}
|
|
1027
|
-
|
|
1028
|
-
const regexRefs_111 = new RegexRefs_72();
|
|
1029
|
-
class Begin_276 extends type__10(Special) {
|
|
1091
|
+
class Begin_269 extends type__10(Special) {
|
|
1030
1092
|
constructor() {
|
|
1031
1093
|
super ();
|
|
1032
1094
|
return;
|
|
1033
1095
|
}
|
|
1034
1096
|
}
|
|
1035
1097
|
/** @type {Special} */
|
|
1036
|
-
export const Begin = new
|
|
1037
|
-
class
|
|
1098
|
+
export const Begin = new Begin_269();
|
|
1099
|
+
class Dot_270 extends type__10(Special) {
|
|
1038
1100
|
constructor() {
|
|
1039
1101
|
super ();
|
|
1040
1102
|
return;
|
|
1041
1103
|
}
|
|
1042
1104
|
}
|
|
1043
1105
|
/** @type {Special} */
|
|
1044
|
-
export const Dot = new
|
|
1045
|
-
class
|
|
1106
|
+
export const Dot = new Dot_270();
|
|
1107
|
+
class End_271 extends type__10(Special) {
|
|
1046
1108
|
constructor() {
|
|
1047
1109
|
super ();
|
|
1048
1110
|
return;
|
|
1049
1111
|
}
|
|
1050
1112
|
}
|
|
1051
1113
|
/** @type {Special} */
|
|
1052
|
-
export const End = new
|
|
1053
|
-
class
|
|
1114
|
+
export const End = new End_271();
|
|
1115
|
+
class WordBoundary_272 extends type__10(Special) {
|
|
1054
1116
|
constructor() {
|
|
1055
1117
|
super ();
|
|
1056
1118
|
return;
|
|
1057
1119
|
}
|
|
1058
1120
|
}
|
|
1059
1121
|
/** @type {Special} */
|
|
1060
|
-
export const WordBoundary = new
|
|
1061
|
-
class
|
|
1122
|
+
export const WordBoundary = new WordBoundary_272();
|
|
1123
|
+
class Digit_273 extends type__10(SpecialSet) {
|
|
1062
1124
|
constructor() {
|
|
1063
1125
|
super ();
|
|
1064
1126
|
return;
|
|
1065
1127
|
}
|
|
1066
1128
|
}
|
|
1067
1129
|
/** @type {SpecialSet} */
|
|
1068
|
-
export const Digit = new
|
|
1069
|
-
class
|
|
1130
|
+
export const Digit = new Digit_273();
|
|
1131
|
+
class Space_274 extends type__10(SpecialSet) {
|
|
1070
1132
|
constructor() {
|
|
1071
1133
|
super ();
|
|
1072
1134
|
return;
|
|
1073
1135
|
}
|
|
1074
1136
|
}
|
|
1075
1137
|
/** @type {SpecialSet} */
|
|
1076
|
-
export const Space = new
|
|
1077
|
-
class
|
|
1138
|
+
export const Space = new Space_274();
|
|
1139
|
+
class Word_275 extends type__10(SpecialSet) {
|
|
1078
1140
|
constructor() {
|
|
1079
1141
|
super ();
|
|
1080
1142
|
return;
|
|
1081
1143
|
}
|
|
1082
1144
|
}
|
|
1083
1145
|
/** @type {SpecialSet} */
|
|
1084
|
-
export const Word = new
|
|
1146
|
+
export const Word = new Word_275();
|
|
1085
1147
|
/** @returns {Array<number>} */
|
|
1086
|
-
function
|
|
1148
|
+
function buildEscapeNeeds_276() {
|
|
1149
|
+
let t_277;
|
|
1150
|
+
let t_278;
|
|
1151
|
+
let t_279;
|
|
1152
|
+
let t_280;
|
|
1153
|
+
let t_281;
|
|
1154
|
+
let t_282;
|
|
1155
|
+
let t_283;
|
|
1087
1156
|
let t_284;
|
|
1088
1157
|
let t_285;
|
|
1089
1158
|
let t_286;
|
|
@@ -1102,184 +1171,179 @@ function buildEscapeNeeds_283() {
|
|
|
1102
1171
|
let t_299;
|
|
1103
1172
|
let t_300;
|
|
1104
1173
|
let t_301;
|
|
1105
|
-
|
|
1106
|
-
let
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
let t_307;
|
|
1111
|
-
let t_308;
|
|
1112
|
-
const escapeNeeds_309 = [];
|
|
1113
|
-
let code_310 = 0;
|
|
1114
|
-
while (code_310 < 127) {
|
|
1115
|
-
if (code_310 === Codes_172.dash) {
|
|
1116
|
-
t_291 = true;
|
|
1174
|
+
const escapeNeeds_302 = [];
|
|
1175
|
+
let code_303 = 0;
|
|
1176
|
+
while (code_303 < 127) {
|
|
1177
|
+
if (code_303 === Codes_167.dash) {
|
|
1178
|
+
t_284 = true;
|
|
1117
1179
|
} else {
|
|
1118
|
-
if (
|
|
1119
|
-
|
|
1180
|
+
if (code_303 === Codes_167.space) {
|
|
1181
|
+
t_283 = true;
|
|
1120
1182
|
} else {
|
|
1121
|
-
if (
|
|
1122
|
-
|
|
1183
|
+
if (code_303 === Codes_167.underscore) {
|
|
1184
|
+
t_282 = true;
|
|
1123
1185
|
} else {
|
|
1124
|
-
if (
|
|
1125
|
-
|
|
1186
|
+
if (Codes_167.digit0 <= code_303) {
|
|
1187
|
+
t_277 = code_303 <= Codes_167.digit9;
|
|
1126
1188
|
} else {
|
|
1127
|
-
|
|
1189
|
+
t_277 = false;
|
|
1128
1190
|
}
|
|
1129
|
-
if (
|
|
1130
|
-
|
|
1191
|
+
if (t_277) {
|
|
1192
|
+
t_281 = true;
|
|
1131
1193
|
} else {
|
|
1132
|
-
if (
|
|
1133
|
-
|
|
1194
|
+
if (Codes_167.upperA <= code_303) {
|
|
1195
|
+
t_278 = code_303 <= Codes_167.upperZ;
|
|
1134
1196
|
} else {
|
|
1135
|
-
|
|
1197
|
+
t_278 = false;
|
|
1136
1198
|
}
|
|
1137
|
-
if (
|
|
1138
|
-
|
|
1199
|
+
if (t_278) {
|
|
1200
|
+
t_280 = true;
|
|
1139
1201
|
} else {
|
|
1140
|
-
if (
|
|
1141
|
-
|
|
1202
|
+
if (Codes_167.lowerA <= code_303) {
|
|
1203
|
+
t_279 = code_303 <= Codes_167.lowerZ;
|
|
1142
1204
|
} else {
|
|
1143
|
-
|
|
1205
|
+
t_279 = false;
|
|
1144
1206
|
}
|
|
1145
|
-
|
|
1207
|
+
t_280 = t_279;
|
|
1146
1208
|
}
|
|
1147
|
-
|
|
1209
|
+
t_281 = t_280;
|
|
1148
1210
|
}
|
|
1149
|
-
|
|
1211
|
+
t_282 = t_281;
|
|
1150
1212
|
}
|
|
1151
|
-
|
|
1213
|
+
t_283 = t_282;
|
|
1152
1214
|
}
|
|
1153
|
-
|
|
1215
|
+
t_284 = t_283;
|
|
1154
1216
|
}
|
|
1155
|
-
if (
|
|
1156
|
-
|
|
1217
|
+
if (t_284) {
|
|
1218
|
+
t_301 = 0;
|
|
1157
1219
|
} else {
|
|
1158
|
-
if (
|
|
1159
|
-
|
|
1220
|
+
if (code_303 === Codes_167.ampersand) {
|
|
1221
|
+
t_300 = true;
|
|
1160
1222
|
} else {
|
|
1161
|
-
if (
|
|
1162
|
-
|
|
1223
|
+
if (code_303 === Codes_167.backslash) {
|
|
1224
|
+
t_299 = true;
|
|
1163
1225
|
} else {
|
|
1164
|
-
if (
|
|
1165
|
-
|
|
1226
|
+
if (code_303 === Codes_167.caret) {
|
|
1227
|
+
t_298 = true;
|
|
1166
1228
|
} else {
|
|
1167
|
-
if (
|
|
1168
|
-
|
|
1229
|
+
if (code_303 === Codes_167.curlyLeft) {
|
|
1230
|
+
t_297 = true;
|
|
1169
1231
|
} else {
|
|
1170
|
-
if (
|
|
1171
|
-
|
|
1232
|
+
if (code_303 === Codes_167.curlyRight) {
|
|
1233
|
+
t_296 = true;
|
|
1172
1234
|
} else {
|
|
1173
|
-
if (
|
|
1174
|
-
|
|
1235
|
+
if (code_303 === Codes_167.dot) {
|
|
1236
|
+
t_295 = true;
|
|
1175
1237
|
} else {
|
|
1176
|
-
if (
|
|
1177
|
-
|
|
1238
|
+
if (code_303 === Codes_167.peso) {
|
|
1239
|
+
t_294 = true;
|
|
1178
1240
|
} else {
|
|
1179
|
-
if (
|
|
1180
|
-
|
|
1241
|
+
if (code_303 === Codes_167.pipe) {
|
|
1242
|
+
t_293 = true;
|
|
1181
1243
|
} else {
|
|
1182
|
-
if (
|
|
1183
|
-
|
|
1244
|
+
if (code_303 === Codes_167.plus) {
|
|
1245
|
+
t_292 = true;
|
|
1184
1246
|
} else {
|
|
1185
|
-
if (
|
|
1186
|
-
|
|
1247
|
+
if (code_303 === Codes_167.question) {
|
|
1248
|
+
t_291 = true;
|
|
1187
1249
|
} else {
|
|
1188
|
-
if (
|
|
1189
|
-
|
|
1250
|
+
if (code_303 === Codes_167.roundLeft) {
|
|
1251
|
+
t_290 = true;
|
|
1190
1252
|
} else {
|
|
1191
|
-
if (
|
|
1192
|
-
|
|
1253
|
+
if (code_303 === Codes_167.roundRight) {
|
|
1254
|
+
t_289 = true;
|
|
1193
1255
|
} else {
|
|
1194
|
-
if (
|
|
1195
|
-
|
|
1256
|
+
if (code_303 === Codes_167.slash) {
|
|
1257
|
+
t_288 = true;
|
|
1196
1258
|
} else {
|
|
1197
|
-
if (
|
|
1198
|
-
|
|
1259
|
+
if (code_303 === Codes_167.squareLeft) {
|
|
1260
|
+
t_287 = true;
|
|
1199
1261
|
} else {
|
|
1200
|
-
if (
|
|
1201
|
-
|
|
1262
|
+
if (code_303 === Codes_167.squareRight) {
|
|
1263
|
+
t_286 = true;
|
|
1202
1264
|
} else {
|
|
1203
|
-
if (
|
|
1204
|
-
|
|
1265
|
+
if (code_303 === Codes_167.star) {
|
|
1266
|
+
t_285 = true;
|
|
1205
1267
|
} else {
|
|
1206
|
-
|
|
1268
|
+
t_285 = code_303 === Codes_167.tilde;
|
|
1207
1269
|
}
|
|
1208
|
-
|
|
1270
|
+
t_286 = t_285;
|
|
1209
1271
|
}
|
|
1210
|
-
|
|
1272
|
+
t_287 = t_286;
|
|
1211
1273
|
}
|
|
1212
|
-
|
|
1274
|
+
t_288 = t_287;
|
|
1213
1275
|
}
|
|
1214
|
-
|
|
1276
|
+
t_289 = t_288;
|
|
1215
1277
|
}
|
|
1216
|
-
|
|
1278
|
+
t_290 = t_289;
|
|
1217
1279
|
}
|
|
1218
|
-
|
|
1280
|
+
t_291 = t_290;
|
|
1219
1281
|
}
|
|
1220
|
-
|
|
1282
|
+
t_292 = t_291;
|
|
1221
1283
|
}
|
|
1222
|
-
|
|
1284
|
+
t_293 = t_292;
|
|
1223
1285
|
}
|
|
1224
|
-
|
|
1286
|
+
t_294 = t_293;
|
|
1225
1287
|
}
|
|
1226
|
-
|
|
1288
|
+
t_295 = t_294;
|
|
1227
1289
|
}
|
|
1228
|
-
|
|
1290
|
+
t_296 = t_295;
|
|
1229
1291
|
}
|
|
1230
|
-
|
|
1292
|
+
t_297 = t_296;
|
|
1231
1293
|
}
|
|
1232
|
-
|
|
1294
|
+
t_298 = t_297;
|
|
1233
1295
|
}
|
|
1234
|
-
|
|
1296
|
+
t_299 = t_298;
|
|
1235
1297
|
}
|
|
1236
|
-
|
|
1298
|
+
t_300 = t_299;
|
|
1237
1299
|
}
|
|
1238
|
-
if (
|
|
1239
|
-
|
|
1300
|
+
if (t_300) {
|
|
1301
|
+
t_301 = 2;
|
|
1240
1302
|
} else {
|
|
1241
|
-
|
|
1303
|
+
t_301 = 1;
|
|
1242
1304
|
}
|
|
1243
1305
|
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1306
|
+
listBuilderAdd_304(escapeNeeds_302, t_301);
|
|
1307
|
+
code_303 = code_303 + 1;
|
|
1246
1308
|
}
|
|
1247
|
-
return
|
|
1309
|
+
return listBuilderToList_305(escapeNeeds_302);
|
|
1248
1310
|
}
|
|
1249
1311
|
/** @type {Array<number>} */
|
|
1250
|
-
const
|
|
1312
|
+
const escapeNeeds_170 = buildEscapeNeeds_276();
|
|
1313
|
+
/** @type {RegexRefs_70} */
|
|
1314
|
+
const regexRefs_110 = new RegexRefs_70();
|
|
1251
1315
|
/**
|
|
1252
|
-
* @param {RegexNode}
|
|
1316
|
+
* @param {RegexNode} item_306
|
|
1253
1317
|
* @returns {RegexNode}
|
|
1254
1318
|
*/
|
|
1255
|
-
export function entire(
|
|
1256
|
-
return new Sequence(Object.freeze([Begin,
|
|
1319
|
+
export function entire(item_306) {
|
|
1320
|
+
return new Sequence(Object.freeze([Begin, item_306, End]));
|
|
1257
1321
|
};
|
|
1258
1322
|
/**
|
|
1259
|
-
* @param {RegexNode}
|
|
1260
|
-
* @param {boolean | null} [
|
|
1323
|
+
* @param {RegexNode} item_307
|
|
1324
|
+
* @param {boolean | null} [reluctant_308]
|
|
1261
1325
|
* @returns {Repeat}
|
|
1262
1326
|
*/
|
|
1263
|
-
export function oneOrMore(
|
|
1264
|
-
let
|
|
1265
|
-
if (
|
|
1266
|
-
|
|
1327
|
+
export function oneOrMore(item_307, reluctant_308) {
|
|
1328
|
+
let reluctant_309;
|
|
1329
|
+
if (reluctant_308 == null) {
|
|
1330
|
+
reluctant_309 = false;
|
|
1267
1331
|
} else {
|
|
1268
|
-
|
|
1332
|
+
reluctant_309 = reluctant_308;
|
|
1269
1333
|
}
|
|
1270
|
-
return new Repeat(
|
|
1334
|
+
return new Repeat(item_307, 1, null, reluctant_309);
|
|
1271
1335
|
};
|
|
1272
1336
|
/**
|
|
1273
|
-
* @param {RegexNode}
|
|
1274
|
-
* @param {boolean | null} [
|
|
1337
|
+
* @param {RegexNode} item_310
|
|
1338
|
+
* @param {boolean | null} [reluctant_311]
|
|
1275
1339
|
* @returns {Repeat}
|
|
1276
1340
|
*/
|
|
1277
|
-
export function optional(
|
|
1278
|
-
let
|
|
1279
|
-
if (
|
|
1280
|
-
|
|
1341
|
+
export function optional(item_310, reluctant_311) {
|
|
1342
|
+
let reluctant_312;
|
|
1343
|
+
if (reluctant_311 == null) {
|
|
1344
|
+
reluctant_312 = false;
|
|
1281
1345
|
} else {
|
|
1282
|
-
|
|
1346
|
+
reluctant_312 = reluctant_311;
|
|
1283
1347
|
}
|
|
1284
|
-
return new Repeat(
|
|
1348
|
+
return new Repeat(item_310, 0, 1, reluctant_312);
|
|
1285
1349
|
};
|