@temperlang/std 0.5.0 → 0.6.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 +1477 -1373
- package/json.js.map +1 -1
- package/net.js +27 -27
- package/net.js.map +1 -1
- package/package.json +4 -4
- package/regex.js +695 -695
- package/regex.js.map +1 -1
- package/temporal.js +63 -63
- package/temporal.js.map +1 -1
- package/testing.js +129 -129
- package/testing.js.map +1 -1
package/regex.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import {
|
|
2
|
-
type as
|
|
2
|
+
type as type__735, requireInstanceOf as requireInstanceOf__859, pairConstructor as pairConstructor_813, mapConstructor as mapConstructor_812, regexCompileFormatted as regexCompileFormatted_825, regexCompiledFound as regexCompiledFound_829, regexCompiledFind as regexCompiledFind_834, regexCompiledReplace as regexCompiledReplace_839, regexCompiledSplit as regexCompiledSplit_842, listedGet as listedGet_894, stringFromCodePoint as stringFromCodePoint_896, regexFormatterPushCodeTo as regexFormatterPushCodeTo_897, stringGet as stringGet_905, stringNext as stringNext_906, regexFormatterAdjustCodeSet as regexFormatterAdjustCodeSet_920, listBuilderAdd as listBuilderAdd_1029, listBuilderToList as listBuilderToList_1030
|
|
3
3
|
} from "@temperlang/core";
|
|
4
|
-
export class RegexNode extends
|
|
4
|
+
export class RegexNode extends type__735() {
|
|
5
5
|
/** @returns {Regex} */
|
|
6
6
|
compiled() {
|
|
7
7
|
return new Regex(this);
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* @param {string}
|
|
10
|
+
* @param {string} text_727
|
|
11
11
|
* @returns {boolean}
|
|
12
12
|
*/
|
|
13
|
-
found(
|
|
14
|
-
return this.compiled().found(
|
|
13
|
+
found(text_727) {
|
|
14
|
+
return this.compiled().found(text_727);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* @param {string}
|
|
17
|
+
* @param {string} text_729
|
|
18
18
|
* @returns {Match}
|
|
19
19
|
*/
|
|
20
|
-
find(
|
|
21
|
-
return this.compiled().find(
|
|
20
|
+
find(text_729) {
|
|
21
|
+
return this.compiled().find(text_729);
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* @param {string}
|
|
25
|
-
* @param {(arg0: Match) => string}
|
|
24
|
+
* @param {string} text_731
|
|
25
|
+
* @param {(arg0: Match) => string} format_732
|
|
26
26
|
* @returns {string}
|
|
27
27
|
*/
|
|
28
|
-
replace(
|
|
29
|
-
return this.compiled().replace(
|
|
28
|
+
replace(text_731, format_732) {
|
|
29
|
+
return this.compiled().replace(text_731, format_732);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
* @param {string}
|
|
32
|
+
* @param {string} text_734
|
|
33
33
|
* @returns {Array<string>}
|
|
34
34
|
*/
|
|
35
|
-
split(
|
|
36
|
-
return this.compiled().split(
|
|
35
|
+
split(text_734) {
|
|
36
|
+
return this.compiled().split(text_734);
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
export class Capture extends
|
|
39
|
+
export class Capture extends type__735(RegexNode) {
|
|
40
40
|
/** @type {string} */
|
|
41
|
-
#
|
|
41
|
+
#name_736;
|
|
42
42
|
/** @type {RegexNode} */
|
|
43
|
-
#
|
|
43
|
+
#item_737;
|
|
44
44
|
/**
|
|
45
45
|
* @param {{
|
|
46
46
|
* name: string, item: RegexNode
|
|
@@ -52,49 +52,49 @@ export class Capture extends type__10(RegexNode) {
|
|
|
52
52
|
return new Capture(props.name, props.item);
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* @param {string}
|
|
56
|
-
* @param {RegexNode}
|
|
55
|
+
* @param {string} name_738
|
|
56
|
+
* @param {RegexNode} item_739
|
|
57
57
|
*/
|
|
58
|
-
constructor(
|
|
58
|
+
constructor(name_738, item_739) {
|
|
59
59
|
super ();
|
|
60
|
-
this.#
|
|
61
|
-
this.#
|
|
60
|
+
this.#name_736 = name_738;
|
|
61
|
+
this.#item_737 = item_739;
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
/** @returns {string} */
|
|
65
65
|
get name() {
|
|
66
|
-
return this.#
|
|
66
|
+
return this.#name_736;
|
|
67
67
|
}
|
|
68
68
|
/** @returns {RegexNode} */
|
|
69
69
|
get item() {
|
|
70
|
-
return this.#
|
|
70
|
+
return this.#item_737;
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
|
-
export class CodePart extends
|
|
73
|
+
export class CodePart extends type__735(RegexNode) {
|
|
74
74
|
};
|
|
75
|
-
export class CodePoints extends
|
|
75
|
+
export class CodePoints extends type__735(CodePart) {
|
|
76
76
|
/** @type {string} */
|
|
77
|
-
#
|
|
78
|
-
/** @param {string}
|
|
79
|
-
constructor(
|
|
77
|
+
#value_742;
|
|
78
|
+
/** @param {string} value_743 */
|
|
79
|
+
constructor(value_743) {
|
|
80
80
|
super ();
|
|
81
|
-
this.#
|
|
81
|
+
this.#value_742 = value_743;
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
/** @returns {string} */
|
|
85
85
|
get value() {
|
|
86
|
-
return this.#
|
|
86
|
+
return this.#value_742;
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
-
export class Special extends
|
|
89
|
+
export class Special extends type__735(RegexNode) {
|
|
90
90
|
};
|
|
91
|
-
export class SpecialSet extends
|
|
91
|
+
export class SpecialSet extends type__735(CodePart, Special) {
|
|
92
92
|
};
|
|
93
|
-
export class CodeRange extends
|
|
93
|
+
export class CodeRange extends type__735(CodePart) {
|
|
94
94
|
/** @type {number} */
|
|
95
|
-
#
|
|
95
|
+
#min_745;
|
|
96
96
|
/** @type {number} */
|
|
97
|
-
#
|
|
97
|
+
#max_746;
|
|
98
98
|
/**
|
|
99
99
|
* @param {{
|
|
100
100
|
* min: number, max: number
|
|
@@ -106,29 +106,29 @@ export class CodeRange extends type__10(CodePart) {
|
|
|
106
106
|
return new CodeRange(props.min, props.max);
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
|
-
* @param {number}
|
|
110
|
-
* @param {number}
|
|
109
|
+
* @param {number} min_747
|
|
110
|
+
* @param {number} max_748
|
|
111
111
|
*/
|
|
112
|
-
constructor(
|
|
112
|
+
constructor(min_747, max_748) {
|
|
113
113
|
super ();
|
|
114
|
-
this.#
|
|
115
|
-
this.#
|
|
114
|
+
this.#min_745 = min_747;
|
|
115
|
+
this.#max_746 = max_748;
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
118
|
/** @returns {number} */
|
|
119
119
|
get min() {
|
|
120
|
-
return this.#
|
|
120
|
+
return this.#min_745;
|
|
121
121
|
}
|
|
122
122
|
/** @returns {number} */
|
|
123
123
|
get max() {
|
|
124
|
-
return this.#
|
|
124
|
+
return this.#max_746;
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
|
-
export class CodeSet extends
|
|
127
|
+
export class CodeSet extends type__735(RegexNode) {
|
|
128
128
|
/** @type {Array<CodePart>} */
|
|
129
|
-
#
|
|
129
|
+
#items_751;
|
|
130
130
|
/** @type {boolean} */
|
|
131
|
-
#
|
|
131
|
+
#negated_752;
|
|
132
132
|
/**
|
|
133
133
|
* @param {{
|
|
134
134
|
* items: Array<CodePart>, negated ?: boolean | null
|
|
@@ -140,53 +140,53 @@ export class CodeSet extends type__10(RegexNode) {
|
|
|
140
140
|
return new CodeSet(props.items, props.negated);
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
|
-
* @param {Array<CodePart>}
|
|
144
|
-
* @param {boolean | null} [
|
|
143
|
+
* @param {Array<CodePart>} items_753
|
|
144
|
+
* @param {boolean | null} [negated_754]
|
|
145
145
|
*/
|
|
146
|
-
constructor(
|
|
146
|
+
constructor(items_753, negated_754) {
|
|
147
147
|
super ();
|
|
148
|
-
let
|
|
149
|
-
if (
|
|
150
|
-
|
|
148
|
+
let negated_755;
|
|
149
|
+
if (negated_754 == null) {
|
|
150
|
+
negated_755 = false;
|
|
151
151
|
} else {
|
|
152
|
-
|
|
152
|
+
negated_755 = negated_754;
|
|
153
153
|
}
|
|
154
|
-
this.#
|
|
155
|
-
this.#
|
|
154
|
+
this.#items_751 = items_753;
|
|
155
|
+
this.#negated_752 = negated_755;
|
|
156
156
|
return;
|
|
157
157
|
}
|
|
158
158
|
/** @returns {Array<CodePart>} */
|
|
159
159
|
get items() {
|
|
160
|
-
return this.#
|
|
160
|
+
return this.#items_751;
|
|
161
161
|
}
|
|
162
162
|
/** @returns {boolean} */
|
|
163
163
|
get negated() {
|
|
164
|
-
return this.#
|
|
164
|
+
return this.#negated_752;
|
|
165
165
|
}
|
|
166
166
|
};
|
|
167
|
-
export class Or extends
|
|
167
|
+
export class Or extends type__735(RegexNode) {
|
|
168
168
|
/** @type {Array<RegexNode>} */
|
|
169
|
-
#
|
|
170
|
-
/** @param {Array<RegexNode>}
|
|
171
|
-
constructor(
|
|
169
|
+
#items_758;
|
|
170
|
+
/** @param {Array<RegexNode>} items_759 */
|
|
171
|
+
constructor(items_759) {
|
|
172
172
|
super ();
|
|
173
|
-
this.#
|
|
173
|
+
this.#items_758 = items_759;
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
176
|
/** @returns {Array<RegexNode>} */
|
|
177
177
|
get items() {
|
|
178
|
-
return this.#
|
|
178
|
+
return this.#items_758;
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
|
-
export class Repeat extends
|
|
181
|
+
export class Repeat extends type__735(RegexNode) {
|
|
182
182
|
/** @type {RegexNode} */
|
|
183
|
-
#
|
|
183
|
+
#item_761;
|
|
184
184
|
/** @type {number} */
|
|
185
|
-
#
|
|
185
|
+
#min_762;
|
|
186
186
|
/** @type {number | null} */
|
|
187
|
-
#
|
|
187
|
+
#max_763;
|
|
188
188
|
/** @type {boolean} */
|
|
189
|
-
#
|
|
189
|
+
#reluctant_764;
|
|
190
190
|
/**
|
|
191
191
|
* @param {{
|
|
192
192
|
* item: RegexNode, min: number, max: number | null, reluctant ?: boolean | null
|
|
@@ -198,61 +198,61 @@ export class Repeat extends type__10(RegexNode) {
|
|
|
198
198
|
return new Repeat(props.item, props.min, props.max, props.reluctant);
|
|
199
199
|
}
|
|
200
200
|
/**
|
|
201
|
-
* @param {RegexNode}
|
|
202
|
-
* @param {number}
|
|
203
|
-
* @param {number | null}
|
|
204
|
-
* @param {boolean | null} [
|
|
201
|
+
* @param {RegexNode} item_765
|
|
202
|
+
* @param {number} min_766
|
|
203
|
+
* @param {number | null} max_767
|
|
204
|
+
* @param {boolean | null} [reluctant_768]
|
|
205
205
|
*/
|
|
206
|
-
constructor(
|
|
206
|
+
constructor(item_765, min_766, max_767, reluctant_768) {
|
|
207
207
|
super ();
|
|
208
|
-
let
|
|
209
|
-
if (
|
|
210
|
-
|
|
208
|
+
let reluctant_769;
|
|
209
|
+
if (reluctant_768 == null) {
|
|
210
|
+
reluctant_769 = false;
|
|
211
211
|
} else {
|
|
212
|
-
|
|
212
|
+
reluctant_769 = reluctant_768;
|
|
213
213
|
}
|
|
214
|
-
this.#
|
|
215
|
-
this.#
|
|
216
|
-
this.#
|
|
217
|
-
this.#
|
|
214
|
+
this.#item_761 = item_765;
|
|
215
|
+
this.#min_762 = min_766;
|
|
216
|
+
this.#max_763 = max_767;
|
|
217
|
+
this.#reluctant_764 = reluctant_769;
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
220
|
/** @returns {RegexNode} */
|
|
221
221
|
get item() {
|
|
222
|
-
return this.#
|
|
222
|
+
return this.#item_761;
|
|
223
223
|
}
|
|
224
224
|
/** @returns {number} */
|
|
225
225
|
get min() {
|
|
226
|
-
return this.#
|
|
226
|
+
return this.#min_762;
|
|
227
227
|
}
|
|
228
228
|
/** @returns {number | null} */
|
|
229
229
|
get max() {
|
|
230
|
-
return this.#
|
|
230
|
+
return this.#max_763;
|
|
231
231
|
}
|
|
232
232
|
/** @returns {boolean} */
|
|
233
233
|
get reluctant() {
|
|
234
|
-
return this.#
|
|
234
|
+
return this.#reluctant_764;
|
|
235
235
|
}
|
|
236
236
|
};
|
|
237
|
-
export class Sequence extends
|
|
237
|
+
export class Sequence extends type__735(RegexNode) {
|
|
238
238
|
/** @type {Array<RegexNode>} */
|
|
239
|
-
#
|
|
240
|
-
/** @param {Array<RegexNode>}
|
|
241
|
-
constructor(
|
|
239
|
+
#items_774;
|
|
240
|
+
/** @param {Array<RegexNode>} items_775 */
|
|
241
|
+
constructor(items_775) {
|
|
242
242
|
super ();
|
|
243
|
-
this.#
|
|
243
|
+
this.#items_774 = items_775;
|
|
244
244
|
return;
|
|
245
245
|
}
|
|
246
246
|
/** @returns {Array<RegexNode>} */
|
|
247
247
|
get items() {
|
|
248
|
-
return this.#
|
|
248
|
+
return this.#items_774;
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
export class Match extends
|
|
251
|
+
export class Match extends type__735() {
|
|
252
252
|
/** @type {Group} */
|
|
253
|
-
#
|
|
253
|
+
#full_777;
|
|
254
254
|
/** @type {Map<string, Group>} */
|
|
255
|
-
#
|
|
255
|
+
#groups_778;
|
|
256
256
|
/**
|
|
257
257
|
* @param {{
|
|
258
258
|
* full: Group, groups: Map<string, Group>
|
|
@@ -264,33 +264,33 @@ export class Match extends type__10() {
|
|
|
264
264
|
return new Match(props.full, props.groups);
|
|
265
265
|
}
|
|
266
266
|
/**
|
|
267
|
-
* @param {Group}
|
|
268
|
-
* @param {Map<string, Group>}
|
|
267
|
+
* @param {Group} full_779
|
|
268
|
+
* @param {Map<string, Group>} groups_780
|
|
269
269
|
*/
|
|
270
|
-
constructor(
|
|
270
|
+
constructor(full_779, groups_780) {
|
|
271
271
|
super ();
|
|
272
|
-
this.#
|
|
273
|
-
this.#
|
|
272
|
+
this.#full_777 = full_779;
|
|
273
|
+
this.#groups_778 = groups_780;
|
|
274
274
|
return;
|
|
275
275
|
}
|
|
276
276
|
/** @returns {Group} */
|
|
277
277
|
get full() {
|
|
278
|
-
return this.#
|
|
278
|
+
return this.#full_777;
|
|
279
279
|
}
|
|
280
280
|
/** @returns {Map<string, Group>} */
|
|
281
281
|
get groups() {
|
|
282
|
-
return this.#
|
|
282
|
+
return this.#groups_778;
|
|
283
283
|
}
|
|
284
284
|
};
|
|
285
|
-
export class Group extends
|
|
285
|
+
export class Group extends type__735() {
|
|
286
286
|
/** @type {string} */
|
|
287
|
-
#
|
|
287
|
+
#name_783;
|
|
288
288
|
/** @type {string} */
|
|
289
|
-
#
|
|
289
|
+
#value_784;
|
|
290
290
|
/** @type {globalThis.number} */
|
|
291
|
-
#
|
|
291
|
+
#begin_785;
|
|
292
292
|
/** @type {globalThis.number} */
|
|
293
|
-
#
|
|
293
|
+
#end_786;
|
|
294
294
|
/**
|
|
295
295
|
* @param {{
|
|
296
296
|
* name: string, value: string, begin: globalThis.number, end: globalThis.number
|
|
@@ -302,1048 +302,1048 @@ export class Group extends type__10() {
|
|
|
302
302
|
return new Group(props.name, props.value, props.begin, props.end);
|
|
303
303
|
}
|
|
304
304
|
/**
|
|
305
|
-
* @param {string}
|
|
306
|
-
* @param {string}
|
|
307
|
-
* @param {globalThis.number}
|
|
308
|
-
* @param {globalThis.number}
|
|
305
|
+
* @param {string} name_787
|
|
306
|
+
* @param {string} value_788
|
|
307
|
+
* @param {globalThis.number} begin_789
|
|
308
|
+
* @param {globalThis.number} end_790
|
|
309
309
|
*/
|
|
310
|
-
constructor(
|
|
310
|
+
constructor(name_787, value_788, begin_789, end_790) {
|
|
311
311
|
super ();
|
|
312
|
-
this.#
|
|
313
|
-
this.#
|
|
314
|
-
this.#
|
|
315
|
-
this.#
|
|
312
|
+
this.#name_783 = name_787;
|
|
313
|
+
this.#value_784 = value_788;
|
|
314
|
+
this.#begin_785 = begin_789;
|
|
315
|
+
this.#end_786 = end_790;
|
|
316
316
|
return;
|
|
317
317
|
}
|
|
318
318
|
/** @returns {string} */
|
|
319
319
|
get name() {
|
|
320
|
-
return this.#
|
|
320
|
+
return this.#name_783;
|
|
321
321
|
}
|
|
322
322
|
/** @returns {string} */
|
|
323
323
|
get value() {
|
|
324
|
-
return this.#
|
|
324
|
+
return this.#value_784;
|
|
325
325
|
}
|
|
326
326
|
/** @returns {globalThis.number} */
|
|
327
327
|
get begin() {
|
|
328
|
-
return this.#
|
|
328
|
+
return this.#begin_785;
|
|
329
329
|
}
|
|
330
330
|
/** @returns {globalThis.number} */
|
|
331
331
|
get end() {
|
|
332
|
-
return this.#
|
|
332
|
+
return this.#end_786;
|
|
333
333
|
}
|
|
334
334
|
};
|
|
335
|
-
class
|
|
335
|
+
class RegexRefs_795 extends type__735() {
|
|
336
336
|
/** @type {CodePoints} */
|
|
337
|
-
#
|
|
337
|
+
#codePoints_796;
|
|
338
338
|
/** @type {Group} */
|
|
339
|
-
#
|
|
339
|
+
#group_797;
|
|
340
340
|
/** @type {Match} */
|
|
341
|
-
#
|
|
341
|
+
#match_798;
|
|
342
342
|
/** @type {Or} */
|
|
343
|
-
#
|
|
343
|
+
#orObject_799;
|
|
344
344
|
/**
|
|
345
345
|
* @param {{
|
|
346
346
|
* codePoints ?: CodePoints | null, group ?: Group | null, match ?: Match | null, orObject ?: Or | null
|
|
347
347
|
* }}
|
|
348
348
|
* props
|
|
349
|
-
* @returns {
|
|
349
|
+
* @returns {RegexRefs_795}
|
|
350
350
|
*/
|
|
351
351
|
static["new"](props) {
|
|
352
|
-
return new
|
|
352
|
+
return new RegexRefs_795(props.codePoints, props.group, props.match, props.orObject);
|
|
353
353
|
}
|
|
354
354
|
/**
|
|
355
|
-
* @param {CodePoints | null} [
|
|
356
|
-
* @param {Group | null} [
|
|
357
|
-
* @param {Match | null} [
|
|
358
|
-
* @param {Or | null} [
|
|
355
|
+
* @param {CodePoints | null} [codePoints_800]
|
|
356
|
+
* @param {Group | null} [group_801]
|
|
357
|
+
* @param {Match | null} [match_802]
|
|
358
|
+
* @param {Or | null} [orObject_803]
|
|
359
359
|
*/
|
|
360
|
-
constructor(
|
|
360
|
+
constructor(codePoints_800, group_801, match_802, orObject_803) {
|
|
361
361
|
super ();
|
|
362
|
-
let
|
|
363
|
-
let
|
|
364
|
-
let
|
|
365
|
-
let
|
|
366
|
-
let
|
|
367
|
-
let
|
|
368
|
-
if (
|
|
369
|
-
|
|
370
|
-
|
|
362
|
+
let t_804;
|
|
363
|
+
let t_805;
|
|
364
|
+
let t_806;
|
|
365
|
+
let t_807;
|
|
366
|
+
let t_808;
|
|
367
|
+
let codePoints_809;
|
|
368
|
+
if (codePoints_800 == null) {
|
|
369
|
+
t_804 = new CodePoints("");
|
|
370
|
+
codePoints_809 = t_804;
|
|
371
371
|
} else {
|
|
372
|
-
|
|
372
|
+
codePoints_809 = codePoints_800;
|
|
373
373
|
}
|
|
374
|
-
let
|
|
375
|
-
if (
|
|
376
|
-
|
|
377
|
-
|
|
374
|
+
let group_810;
|
|
375
|
+
if (group_801 == null) {
|
|
376
|
+
t_805 = new Group("", "", 0, 0);
|
|
377
|
+
group_810 = t_805;
|
|
378
378
|
} else {
|
|
379
|
-
|
|
379
|
+
group_810 = group_801;
|
|
380
380
|
}
|
|
381
|
-
let
|
|
382
|
-
if (
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
381
|
+
let match_811;
|
|
382
|
+
if (match_802 == null) {
|
|
383
|
+
t_806 = mapConstructor_812(Object.freeze([pairConstructor_813("", group_810)]));
|
|
384
|
+
t_807 = new Match(group_810, t_806);
|
|
385
|
+
match_811 = t_807;
|
|
386
386
|
} else {
|
|
387
|
-
|
|
387
|
+
match_811 = match_802;
|
|
388
388
|
}
|
|
389
|
-
let
|
|
390
|
-
if (
|
|
391
|
-
|
|
392
|
-
|
|
389
|
+
let orObject_814;
|
|
390
|
+
if (orObject_803 == null) {
|
|
391
|
+
t_808 = new Or(Object.freeze([]));
|
|
392
|
+
orObject_814 = t_808;
|
|
393
393
|
} else {
|
|
394
|
-
|
|
394
|
+
orObject_814 = orObject_803;
|
|
395
395
|
}
|
|
396
|
-
this.#
|
|
397
|
-
this.#
|
|
398
|
-
this.#
|
|
399
|
-
this.#
|
|
396
|
+
this.#codePoints_796 = codePoints_809;
|
|
397
|
+
this.#group_797 = group_810;
|
|
398
|
+
this.#match_798 = match_811;
|
|
399
|
+
this.#orObject_799 = orObject_814;
|
|
400
400
|
return;
|
|
401
401
|
}
|
|
402
402
|
/** @returns {CodePoints} */
|
|
403
403
|
get codePoints() {
|
|
404
|
-
return this.#
|
|
404
|
+
return this.#codePoints_796;
|
|
405
405
|
}
|
|
406
406
|
/** @returns {Group} */
|
|
407
407
|
get group() {
|
|
408
|
-
return this.#
|
|
408
|
+
return this.#group_797;
|
|
409
409
|
}
|
|
410
410
|
/** @returns {Match} */
|
|
411
411
|
get match() {
|
|
412
|
-
return this.#
|
|
412
|
+
return this.#match_798;
|
|
413
413
|
}
|
|
414
414
|
/** @returns {Or} */
|
|
415
415
|
get orObject() {
|
|
416
|
-
return this.#
|
|
416
|
+
return this.#orObject_799;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
export class Regex extends
|
|
419
|
+
export class Regex extends type__735() {
|
|
420
420
|
/** @type {RegexNode} */
|
|
421
|
-
#
|
|
422
|
-
/** @param {RegexNode}
|
|
423
|
-
constructor(
|
|
421
|
+
#data_819;
|
|
422
|
+
/** @param {RegexNode} data_820 */
|
|
423
|
+
constructor(data_820) {
|
|
424
424
|
super ();
|
|
425
|
-
const
|
|
426
|
-
this.#
|
|
427
|
-
const
|
|
428
|
-
let
|
|
429
|
-
this.#
|
|
425
|
+
const t_821 = data_820;
|
|
426
|
+
this.#data_819 = t_821;
|
|
427
|
+
const formatted_822 = RegexFormatter_823.regexFormat(data_820);
|
|
428
|
+
let t_824 = regexCompileFormatted_825(data_820, formatted_822);
|
|
429
|
+
this.#compiled_826 = t_824;
|
|
430
430
|
return;
|
|
431
431
|
}
|
|
432
432
|
/**
|
|
433
|
-
* @param {string}
|
|
433
|
+
* @param {string} text_828
|
|
434
434
|
* @returns {boolean}
|
|
435
435
|
*/
|
|
436
|
-
found(
|
|
437
|
-
return
|
|
436
|
+
found(text_828) {
|
|
437
|
+
return regexCompiledFound_829(this, this.#compiled_826, text_828);
|
|
438
438
|
}
|
|
439
439
|
/**
|
|
440
|
-
* @param {string}
|
|
441
|
-
* @param {globalThis.number | null} [
|
|
440
|
+
* @param {string} text_831
|
|
441
|
+
* @param {globalThis.number | null} [begin_832]
|
|
442
442
|
* @returns {Match}
|
|
443
443
|
*/
|
|
444
|
-
find(
|
|
445
|
-
let
|
|
446
|
-
if (
|
|
447
|
-
|
|
444
|
+
find(text_831, begin_832) {
|
|
445
|
+
let begin_833;
|
|
446
|
+
if (begin_832 == null) {
|
|
447
|
+
begin_833 = 0;
|
|
448
448
|
} else {
|
|
449
|
-
|
|
449
|
+
begin_833 = begin_832;
|
|
450
450
|
}
|
|
451
|
-
return
|
|
451
|
+
return regexCompiledFind_834(this, this.#compiled_826, text_831, begin_833, regexRefs_835);
|
|
452
452
|
}
|
|
453
453
|
/**
|
|
454
|
-
* @param {string}
|
|
455
|
-
* @param {(arg0: Match) => string}
|
|
454
|
+
* @param {string} text_837
|
|
455
|
+
* @param {(arg0: Match) => string} format_838
|
|
456
456
|
* @returns {string}
|
|
457
457
|
*/
|
|
458
|
-
replace(
|
|
459
|
-
return
|
|
458
|
+
replace(text_837, format_838) {
|
|
459
|
+
return regexCompiledReplace_839(this, this.#compiled_826, text_837, format_838, regexRefs_835);
|
|
460
460
|
}
|
|
461
461
|
/**
|
|
462
|
-
* @param {string}
|
|
462
|
+
* @param {string} text_841
|
|
463
463
|
* @returns {Array<string>}
|
|
464
464
|
*/
|
|
465
|
-
split(
|
|
466
|
-
return
|
|
465
|
+
split(text_841) {
|
|
466
|
+
return regexCompiledSplit_842(this, this.#compiled_826, text_841, regexRefs_835);
|
|
467
467
|
}
|
|
468
468
|
/** @type {unknown} */
|
|
469
|
-
#
|
|
469
|
+
#compiled_826;
|
|
470
470
|
/** @returns {RegexNode} */
|
|
471
471
|
get data() {
|
|
472
|
-
return this.#
|
|
472
|
+
return this.#data_819;
|
|
473
473
|
}
|
|
474
474
|
};
|
|
475
|
-
class
|
|
475
|
+
class RegexFormatter_823 extends type__735() {
|
|
476
476
|
/** @type {globalThis.Array<string>} */
|
|
477
|
-
#
|
|
477
|
+
#out_844;
|
|
478
478
|
/**
|
|
479
|
-
* @param {RegexNode}
|
|
479
|
+
* @param {RegexNode} data_846
|
|
480
480
|
* @returns {string}
|
|
481
481
|
*/
|
|
482
|
-
static regexFormat(
|
|
483
|
-
return new
|
|
482
|
+
static regexFormat(data_846) {
|
|
483
|
+
return new RegexFormatter_823().format(data_846);
|
|
484
484
|
}
|
|
485
485
|
/**
|
|
486
|
-
* @param {RegexNode}
|
|
486
|
+
* @param {RegexNode} regex_848
|
|
487
487
|
* @returns {string}
|
|
488
488
|
*/
|
|
489
|
-
format(
|
|
490
|
-
this.#
|
|
491
|
-
return this.#
|
|
492
|
-
}
|
|
493
|
-
/** @param {RegexNode}
|
|
494
|
-
#
|
|
495
|
-
let
|
|
496
|
-
let
|
|
497
|
-
let
|
|
498
|
-
let
|
|
499
|
-
let
|
|
500
|
-
let
|
|
501
|
-
let
|
|
502
|
-
if (
|
|
503
|
-
|
|
504
|
-
this.#
|
|
505
|
-
} else if (
|
|
506
|
-
|
|
507
|
-
this.#
|
|
508
|
-
} else if (
|
|
509
|
-
|
|
510
|
-
this.#
|
|
511
|
-
} else if (
|
|
512
|
-
|
|
513
|
-
this.#
|
|
514
|
-
} else if (
|
|
515
|
-
|
|
516
|
-
this.#
|
|
517
|
-
} else if (
|
|
518
|
-
|
|
519
|
-
this.#
|
|
520
|
-
} else if (
|
|
521
|
-
|
|
522
|
-
this.#
|
|
523
|
-
} else if (Object.is(
|
|
524
|
-
this.#
|
|
525
|
-
} else if (Object.is(
|
|
526
|
-
this.#
|
|
527
|
-
} else if (Object.is(
|
|
528
|
-
this.#
|
|
529
|
-
} else if (Object.is(
|
|
530
|
-
this.#
|
|
531
|
-
} else if (Object.is(
|
|
532
|
-
this.#
|
|
533
|
-
} else if (Object.is(
|
|
534
|
-
this.#
|
|
535
|
-
} else if (Object.is(
|
|
536
|
-
this.#
|
|
489
|
+
format(regex_848) {
|
|
490
|
+
this.#pushRegex_849(regex_848);
|
|
491
|
+
return this.#out_844[0];
|
|
492
|
+
}
|
|
493
|
+
/** @param {RegexNode} regex_851 */
|
|
494
|
+
#pushRegex_849(regex_851) {
|
|
495
|
+
let t_852;
|
|
496
|
+
let t_853;
|
|
497
|
+
let t_854;
|
|
498
|
+
let t_855;
|
|
499
|
+
let t_856;
|
|
500
|
+
let t_857;
|
|
501
|
+
let t_858;
|
|
502
|
+
if (regex_851 instanceof Capture) {
|
|
503
|
+
t_852 = requireInstanceOf__859(regex_851, Capture);
|
|
504
|
+
this.#pushCapture_860(t_852);
|
|
505
|
+
} else if (regex_851 instanceof CodePoints) {
|
|
506
|
+
t_853 = requireInstanceOf__859(regex_851, CodePoints);
|
|
507
|
+
this.#pushCodePoints_861(t_853, false);
|
|
508
|
+
} else if (regex_851 instanceof CodeRange) {
|
|
509
|
+
t_854 = requireInstanceOf__859(regex_851, CodeRange);
|
|
510
|
+
this.#pushCodeRange_862(t_854);
|
|
511
|
+
} else if (regex_851 instanceof CodeSet) {
|
|
512
|
+
t_855 = requireInstanceOf__859(regex_851, CodeSet);
|
|
513
|
+
this.#pushCodeSet_863(t_855);
|
|
514
|
+
} else if (regex_851 instanceof Or) {
|
|
515
|
+
t_856 = requireInstanceOf__859(regex_851, Or);
|
|
516
|
+
this.#pushOr_864(t_856);
|
|
517
|
+
} else if (regex_851 instanceof Repeat) {
|
|
518
|
+
t_857 = requireInstanceOf__859(regex_851, Repeat);
|
|
519
|
+
this.#pushRepeat_865(t_857);
|
|
520
|
+
} else if (regex_851 instanceof Sequence) {
|
|
521
|
+
t_858 = requireInstanceOf__859(regex_851, Sequence);
|
|
522
|
+
this.#pushSequence_866(t_858);
|
|
523
|
+
} else if (Object.is(regex_851, Begin)) {
|
|
524
|
+
this.#out_844[0] += "^";
|
|
525
|
+
} else if (Object.is(regex_851, Dot)) {
|
|
526
|
+
this.#out_844[0] += ".";
|
|
527
|
+
} else if (Object.is(regex_851, End)) {
|
|
528
|
+
this.#out_844[0] += "\u0024";
|
|
529
|
+
} else if (Object.is(regex_851, WordBoundary)) {
|
|
530
|
+
this.#out_844[0] += "\\b";
|
|
531
|
+
} else if (Object.is(regex_851, Digit)) {
|
|
532
|
+
this.#out_844[0] += "\\d";
|
|
533
|
+
} else if (Object.is(regex_851, Space)) {
|
|
534
|
+
this.#out_844[0] += "\\s";
|
|
535
|
+
} else if (Object.is(regex_851, Word)) {
|
|
536
|
+
this.#out_844[0] += "\\w";
|
|
537
537
|
}
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
|
-
/** @param {Capture}
|
|
541
|
-
#
|
|
542
|
-
this.#
|
|
543
|
-
let
|
|
544
|
-
let
|
|
545
|
-
this.#
|
|
546
|
-
let
|
|
547
|
-
this.#
|
|
548
|
-
this.#
|
|
540
|
+
/** @param {Capture} capture_868 */
|
|
541
|
+
#pushCapture_860(capture_868) {
|
|
542
|
+
this.#out_844[0] += "(";
|
|
543
|
+
let t_869 = this.#out_844;
|
|
544
|
+
let t_870 = capture_868.name;
|
|
545
|
+
this.#pushCaptureName_871(t_869, t_870);
|
|
546
|
+
let t_872 = capture_868.item;
|
|
547
|
+
this.#pushRegex_849(t_872);
|
|
548
|
+
this.#out_844[0] += ")";
|
|
549
549
|
return;
|
|
550
550
|
}
|
|
551
551
|
/**
|
|
552
|
-
* @param {globalThis.Array<string>}
|
|
553
|
-
* @param {string}
|
|
552
|
+
* @param {globalThis.Array<string>} out_874
|
|
553
|
+
* @param {string} name_875
|
|
554
554
|
*/
|
|
555
|
-
#
|
|
556
|
-
|
|
555
|
+
#pushCaptureName_871(out_874, name_875) {
|
|
556
|
+
out_874[0] += "?\u003c" + name_875 + "\u003e";
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
559
559
|
/**
|
|
560
|
-
* @param {number}
|
|
561
|
-
* @param {boolean}
|
|
560
|
+
* @param {number} code_878
|
|
561
|
+
* @param {boolean} insideCodeSet_879
|
|
562
562
|
*/
|
|
563
|
-
#
|
|
564
|
-
let
|
|
565
|
-
let
|
|
566
|
-
let
|
|
567
|
-
let
|
|
568
|
-
let
|
|
569
|
-
let
|
|
570
|
-
let
|
|
571
|
-
let
|
|
572
|
-
let
|
|
573
|
-
let
|
|
574
|
-
|
|
563
|
+
#pushCode_877(code_878, insideCodeSet_879) {
|
|
564
|
+
let return_880;
|
|
565
|
+
let t_881;
|
|
566
|
+
let t_882;
|
|
567
|
+
let t_883;
|
|
568
|
+
let t_884;
|
|
569
|
+
let t_885;
|
|
570
|
+
let t_886;
|
|
571
|
+
let t_887;
|
|
572
|
+
let t_888;
|
|
573
|
+
let t_889;
|
|
574
|
+
fn_890: {
|
|
575
575
|
try {
|
|
576
|
-
let
|
|
577
|
-
if (
|
|
578
|
-
|
|
579
|
-
} else if (
|
|
580
|
-
|
|
581
|
-
} else if (
|
|
582
|
-
|
|
576
|
+
let specialEscape_891;
|
|
577
|
+
if (code_878 === Codes_892.carriageReturn) {
|
|
578
|
+
specialEscape_891 = "r";
|
|
579
|
+
} else if (code_878 === Codes_892.newline) {
|
|
580
|
+
specialEscape_891 = "n";
|
|
581
|
+
} else if (code_878 === Codes_892.tab) {
|
|
582
|
+
specialEscape_891 = "t";
|
|
583
583
|
} else {
|
|
584
|
-
|
|
584
|
+
specialEscape_891 = "";
|
|
585
585
|
}
|
|
586
|
-
if (
|
|
587
|
-
this.#
|
|
588
|
-
this.#
|
|
589
|
-
|
|
590
|
-
break
|
|
586
|
+
if (specialEscape_891 !== "") {
|
|
587
|
+
this.#out_844[0] += "\\";
|
|
588
|
+
this.#out_844[0] += specialEscape_891;
|
|
589
|
+
return_880 = void 0;
|
|
590
|
+
break fn_890;
|
|
591
591
|
}
|
|
592
|
-
if (
|
|
593
|
-
const
|
|
594
|
-
if (
|
|
595
|
-
|
|
592
|
+
if (code_878 <= 127) {
|
|
593
|
+
const escapeNeed_893 = listedGet_894(escapeNeeds_895, code_878);
|
|
594
|
+
if (escapeNeed_893 === 2) {
|
|
595
|
+
t_882 = true;
|
|
596
596
|
} else {
|
|
597
|
-
if (
|
|
598
|
-
|
|
597
|
+
if (insideCodeSet_879) {
|
|
598
|
+
t_881 = code_878 === Codes_892.dash;
|
|
599
599
|
} else {
|
|
600
|
-
|
|
600
|
+
t_881 = false;
|
|
601
601
|
}
|
|
602
|
-
|
|
602
|
+
t_882 = t_881;
|
|
603
603
|
}
|
|
604
|
-
if (
|
|
605
|
-
this.#
|
|
606
|
-
|
|
607
|
-
this.#
|
|
608
|
-
|
|
609
|
-
break
|
|
610
|
-
} else if (
|
|
611
|
-
|
|
612
|
-
this.#
|
|
613
|
-
|
|
614
|
-
break
|
|
604
|
+
if (t_882) {
|
|
605
|
+
this.#out_844[0] += "\\";
|
|
606
|
+
t_883 = stringFromCodePoint_896(code_878);
|
|
607
|
+
this.#out_844[0] += t_883;
|
|
608
|
+
return_880 = void 0;
|
|
609
|
+
break fn_890;
|
|
610
|
+
} else if (escapeNeed_893 === 0) {
|
|
611
|
+
t_884 = stringFromCodePoint_896(code_878);
|
|
612
|
+
this.#out_844[0] += t_884;
|
|
613
|
+
return_880 = void 0;
|
|
614
|
+
break fn_890;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
if (
|
|
618
|
-
|
|
617
|
+
if (code_878 >= Codes_892.supplementalMin) {
|
|
618
|
+
t_888 = true;
|
|
619
619
|
} else {
|
|
620
|
-
if (
|
|
621
|
-
if (
|
|
622
|
-
|
|
620
|
+
if (code_878 > Codes_892.highControlMax) {
|
|
621
|
+
if (Codes_892.surrogateMin <= code_878) {
|
|
622
|
+
t_885 = code_878 <= Codes_892.surrogateMax;
|
|
623
623
|
} else {
|
|
624
|
-
|
|
624
|
+
t_885 = false;
|
|
625
625
|
}
|
|
626
|
-
if (
|
|
627
|
-
|
|
626
|
+
if (t_885) {
|
|
627
|
+
t_886 = true;
|
|
628
628
|
} else {
|
|
629
|
-
|
|
629
|
+
t_886 = code_878 === Codes_892.uint16Max;
|
|
630
630
|
}
|
|
631
|
-
|
|
631
|
+
t_887 = ! t_886;
|
|
632
632
|
} else {
|
|
633
|
-
|
|
633
|
+
t_887 = false;
|
|
634
634
|
}
|
|
635
|
-
|
|
635
|
+
t_888 = t_887;
|
|
636
636
|
}
|
|
637
|
-
if (
|
|
638
|
-
|
|
639
|
-
this.#
|
|
637
|
+
if (t_888) {
|
|
638
|
+
t_889 = stringFromCodePoint_896(code_878);
|
|
639
|
+
this.#out_844[0] += t_889;
|
|
640
640
|
} else {
|
|
641
|
-
|
|
641
|
+
regexFormatterPushCodeTo_897(this, this.#out_844, code_878, insideCodeSet_879);
|
|
642
642
|
}
|
|
643
643
|
} catch {
|
|
644
644
|
throw Error();
|
|
645
645
|
}
|
|
646
|
-
|
|
646
|
+
return_880 = void 0;
|
|
647
647
|
}
|
|
648
|
-
return
|
|
648
|
+
return return_880;
|
|
649
649
|
}
|
|
650
650
|
/**
|
|
651
|
-
* @param {CodePoints}
|
|
652
|
-
* @param {boolean}
|
|
651
|
+
* @param {CodePoints} codePoints_899
|
|
652
|
+
* @param {boolean} insideCodeSet_900
|
|
653
653
|
*/
|
|
654
|
-
#
|
|
655
|
-
let
|
|
656
|
-
let
|
|
657
|
-
const
|
|
658
|
-
let
|
|
654
|
+
#pushCodePoints_861(codePoints_899, insideCodeSet_900) {
|
|
655
|
+
let t_901;
|
|
656
|
+
let t_902;
|
|
657
|
+
const value_903 = codePoints_899.value;
|
|
658
|
+
let index_904 = 0;
|
|
659
659
|
while (true) {
|
|
660
|
-
if (!(
|
|
660
|
+
if (!(value_903.length > index_904)) {
|
|
661
661
|
break;
|
|
662
662
|
}
|
|
663
|
-
|
|
664
|
-
this.#
|
|
665
|
-
|
|
666
|
-
|
|
663
|
+
t_901 = stringGet_905(value_903, index_904);
|
|
664
|
+
this.#pushCode_877(t_901, insideCodeSet_900);
|
|
665
|
+
t_902 = stringNext_906(value_903, index_904);
|
|
666
|
+
index_904 = t_902;
|
|
667
667
|
}
|
|
668
668
|
return;
|
|
669
669
|
}
|
|
670
|
-
/** @param {CodeRange}
|
|
671
|
-
#
|
|
672
|
-
this.#
|
|
673
|
-
this.#
|
|
674
|
-
this.#
|
|
670
|
+
/** @param {CodeRange} codeRange_908 */
|
|
671
|
+
#pushCodeRange_862(codeRange_908) {
|
|
672
|
+
this.#out_844[0] += "[";
|
|
673
|
+
this.#pushCodeRangeUnwrapped_909(codeRange_908);
|
|
674
|
+
this.#out_844[0] += "]";
|
|
675
675
|
return;
|
|
676
676
|
}
|
|
677
|
-
/** @param {CodeRange}
|
|
678
|
-
#
|
|
679
|
-
let
|
|
680
|
-
this.#
|
|
681
|
-
this.#
|
|
682
|
-
let
|
|
683
|
-
this.#
|
|
677
|
+
/** @param {CodeRange} codeRange_911 */
|
|
678
|
+
#pushCodeRangeUnwrapped_909(codeRange_911) {
|
|
679
|
+
let t_912 = codeRange_911.min;
|
|
680
|
+
this.#pushCode_877(t_912, true);
|
|
681
|
+
this.#out_844[0] += "-";
|
|
682
|
+
let t_913 = codeRange_911.max;
|
|
683
|
+
this.#pushCode_877(t_913, true);
|
|
684
684
|
return;
|
|
685
685
|
}
|
|
686
|
-
/** @param {CodeSet}
|
|
687
|
-
#
|
|
688
|
-
let
|
|
689
|
-
let
|
|
690
|
-
let
|
|
691
|
-
const
|
|
692
|
-
if (
|
|
693
|
-
|
|
694
|
-
this.#
|
|
695
|
-
if (
|
|
696
|
-
this.#
|
|
686
|
+
/** @param {CodeSet} codeSet_915 */
|
|
687
|
+
#pushCodeSet_863(codeSet_915) {
|
|
688
|
+
let t_916;
|
|
689
|
+
let t_917;
|
|
690
|
+
let t_918;
|
|
691
|
+
const adjusted_919 = regexFormatterAdjustCodeSet_920(this, codeSet_915, regexRefs_835);
|
|
692
|
+
if (adjusted_919 instanceof CodeSet) {
|
|
693
|
+
t_918 = requireInstanceOf__859(adjusted_919, CodeSet);
|
|
694
|
+
this.#out_844[0] += "[";
|
|
695
|
+
if (t_918.negated) {
|
|
696
|
+
this.#out_844[0] += "^";
|
|
697
697
|
}
|
|
698
|
-
let
|
|
698
|
+
let i_921 = 0;
|
|
699
699
|
while (true) {
|
|
700
|
-
|
|
701
|
-
if (!(
|
|
700
|
+
t_916 = t_918.items.length;
|
|
701
|
+
if (!(i_921 < t_916)) {
|
|
702
702
|
break;
|
|
703
703
|
}
|
|
704
|
-
|
|
705
|
-
this.#
|
|
706
|
-
|
|
704
|
+
t_917 = listedGet_894(t_918.items, i_921);
|
|
705
|
+
this.#pushCodeSetItem_922(t_917);
|
|
706
|
+
i_921 = i_921 + 1 | 0;
|
|
707
707
|
}
|
|
708
|
-
this.#
|
|
708
|
+
this.#out_844[0] += "]";
|
|
709
709
|
} else {
|
|
710
|
-
this.#
|
|
710
|
+
this.#pushRegex_849(adjusted_919);
|
|
711
711
|
}
|
|
712
712
|
return;
|
|
713
713
|
}
|
|
714
|
-
/** @param {CodePart}
|
|
715
|
-
#
|
|
716
|
-
let
|
|
717
|
-
let
|
|
718
|
-
let
|
|
719
|
-
if (
|
|
720
|
-
|
|
721
|
-
this.#
|
|
722
|
-
} else if (
|
|
723
|
-
|
|
724
|
-
this.#
|
|
725
|
-
} else if (
|
|
726
|
-
|
|
727
|
-
this.#
|
|
714
|
+
/** @param {CodePart} codePart_924 */
|
|
715
|
+
#pushCodeSetItem_922(codePart_924) {
|
|
716
|
+
let t_925;
|
|
717
|
+
let t_926;
|
|
718
|
+
let t_927;
|
|
719
|
+
if (codePart_924 instanceof CodePoints) {
|
|
720
|
+
t_925 = requireInstanceOf__859(codePart_924, CodePoints);
|
|
721
|
+
this.#pushCodePoints_861(t_925, true);
|
|
722
|
+
} else if (codePart_924 instanceof CodeRange) {
|
|
723
|
+
t_926 = requireInstanceOf__859(codePart_924, CodeRange);
|
|
724
|
+
this.#pushCodeRangeUnwrapped_909(t_926);
|
|
725
|
+
} else if (codePart_924 instanceof SpecialSet) {
|
|
726
|
+
t_927 = requireInstanceOf__859(codePart_924, SpecialSet);
|
|
727
|
+
this.#pushRegex_849(t_927);
|
|
728
728
|
}
|
|
729
729
|
return;
|
|
730
730
|
}
|
|
731
|
-
/** @param {Or}
|
|
732
|
-
#
|
|
733
|
-
let
|
|
734
|
-
let
|
|
735
|
-
let
|
|
736
|
-
if (! !
|
|
737
|
-
this.#
|
|
738
|
-
|
|
739
|
-
this.#
|
|
740
|
-
let
|
|
731
|
+
/** @param {Or} or_929 */
|
|
732
|
+
#pushOr_864(or_929) {
|
|
733
|
+
let t_930;
|
|
734
|
+
let t_931;
|
|
735
|
+
let t_932;
|
|
736
|
+
if (! ! or_929.items.length) {
|
|
737
|
+
this.#out_844[0] += "(?:";
|
|
738
|
+
t_930 = listedGet_894(or_929.items, 0);
|
|
739
|
+
this.#pushRegex_849(t_930);
|
|
740
|
+
let i_933 = 1;
|
|
741
741
|
while (true) {
|
|
742
|
-
|
|
743
|
-
if (!(
|
|
742
|
+
t_931 = or_929.items.length;
|
|
743
|
+
if (!(i_933 < t_931)) {
|
|
744
744
|
break;
|
|
745
745
|
}
|
|
746
|
-
this.#
|
|
747
|
-
|
|
748
|
-
this.#
|
|
749
|
-
|
|
746
|
+
this.#out_844[0] += "|";
|
|
747
|
+
t_932 = listedGet_894(or_929.items, i_933);
|
|
748
|
+
this.#pushRegex_849(t_932);
|
|
749
|
+
i_933 = i_933 + 1 | 0;
|
|
750
750
|
}
|
|
751
|
-
this.#
|
|
751
|
+
this.#out_844[0] += ")";
|
|
752
752
|
}
|
|
753
753
|
return;
|
|
754
754
|
}
|
|
755
|
-
/** @param {Repeat}
|
|
756
|
-
#
|
|
757
|
-
let
|
|
758
|
-
let
|
|
759
|
-
let
|
|
760
|
-
let
|
|
761
|
-
let
|
|
762
|
-
this.#
|
|
763
|
-
let
|
|
764
|
-
this.#
|
|
765
|
-
this.#
|
|
766
|
-
const
|
|
767
|
-
const
|
|
768
|
-
if (
|
|
769
|
-
|
|
755
|
+
/** @param {Repeat} repeat_935 */
|
|
756
|
+
#pushRepeat_865(repeat_935) {
|
|
757
|
+
let t_936;
|
|
758
|
+
let t_937;
|
|
759
|
+
let t_938;
|
|
760
|
+
let t_939;
|
|
761
|
+
let t_940;
|
|
762
|
+
this.#out_844[0] += "(?:";
|
|
763
|
+
let t_941 = repeat_935.item;
|
|
764
|
+
this.#pushRegex_849(t_941);
|
|
765
|
+
this.#out_844[0] += ")";
|
|
766
|
+
const min_942 = repeat_935.min;
|
|
767
|
+
const max_943 = repeat_935.max;
|
|
768
|
+
if (min_942 === 0) {
|
|
769
|
+
t_938 = max_943 === 1;
|
|
770
770
|
} else {
|
|
771
|
-
|
|
771
|
+
t_938 = false;
|
|
772
772
|
}
|
|
773
|
-
if (
|
|
774
|
-
this.#
|
|
773
|
+
if (t_938) {
|
|
774
|
+
this.#out_844[0] += "?";
|
|
775
775
|
} else {
|
|
776
|
-
if (
|
|
777
|
-
|
|
776
|
+
if (min_942 === 0) {
|
|
777
|
+
t_939 = max_943 == null;
|
|
778
778
|
} else {
|
|
779
|
-
|
|
779
|
+
t_939 = false;
|
|
780
780
|
}
|
|
781
|
-
if (
|
|
782
|
-
this.#
|
|
781
|
+
if (t_939) {
|
|
782
|
+
this.#out_844[0] += "*";
|
|
783
783
|
} else {
|
|
784
|
-
if (
|
|
785
|
-
|
|
784
|
+
if (min_942 === 1) {
|
|
785
|
+
t_940 = max_943 == null;
|
|
786
786
|
} else {
|
|
787
|
-
|
|
787
|
+
t_940 = false;
|
|
788
788
|
}
|
|
789
|
-
if (
|
|
790
|
-
this.#
|
|
789
|
+
if (t_940) {
|
|
790
|
+
this.#out_844[0] += "+";
|
|
791
791
|
} else {
|
|
792
|
-
|
|
793
|
-
this.#
|
|
794
|
-
if (
|
|
795
|
-
this.#
|
|
796
|
-
if (!(
|
|
797
|
-
|
|
798
|
-
this.#
|
|
792
|
+
t_936 = min_942.toString();
|
|
793
|
+
this.#out_844[0] += "{" + t_936;
|
|
794
|
+
if (min_942 !== max_943) {
|
|
795
|
+
this.#out_844[0] += ",";
|
|
796
|
+
if (!(max_943 == null)) {
|
|
797
|
+
t_937 = max_943.toString();
|
|
798
|
+
this.#out_844[0] += t_937;
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
this.#
|
|
801
|
+
this.#out_844[0] += "}";
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
|
-
if (
|
|
806
|
-
this.#
|
|
805
|
+
if (repeat_935.reluctant) {
|
|
806
|
+
this.#out_844[0] += "?";
|
|
807
807
|
}
|
|
808
808
|
return;
|
|
809
809
|
}
|
|
810
|
-
/** @param {Sequence}
|
|
811
|
-
#
|
|
812
|
-
let
|
|
813
|
-
let
|
|
814
|
-
let
|
|
810
|
+
/** @param {Sequence} sequence_945 */
|
|
811
|
+
#pushSequence_866(sequence_945) {
|
|
812
|
+
let t_946;
|
|
813
|
+
let t_947;
|
|
814
|
+
let i_948 = 0;
|
|
815
815
|
while (true) {
|
|
816
|
-
|
|
817
|
-
if (!(
|
|
816
|
+
t_946 = sequence_945.items.length;
|
|
817
|
+
if (!(i_948 < t_946)) {
|
|
818
818
|
break;
|
|
819
819
|
}
|
|
820
|
-
|
|
821
|
-
this.#
|
|
822
|
-
|
|
820
|
+
t_947 = listedGet_894(sequence_945.items, i_948);
|
|
821
|
+
this.#pushRegex_849(t_947);
|
|
822
|
+
i_948 = i_948 + 1 | 0;
|
|
823
823
|
}
|
|
824
824
|
return;
|
|
825
825
|
}
|
|
826
826
|
/**
|
|
827
|
-
* @param {CodePart}
|
|
827
|
+
* @param {CodePart} codePart_950
|
|
828
828
|
* @returns {number | null}
|
|
829
829
|
*/
|
|
830
|
-
maxCode(
|
|
831
|
-
let
|
|
832
|
-
let
|
|
833
|
-
let
|
|
834
|
-
if (
|
|
835
|
-
|
|
836
|
-
const
|
|
837
|
-
if (!
|
|
838
|
-
|
|
830
|
+
maxCode(codePart_950) {
|
|
831
|
+
let return_951;
|
|
832
|
+
let t_952;
|
|
833
|
+
let t_953;
|
|
834
|
+
if (codePart_950 instanceof CodePoints) {
|
|
835
|
+
t_953 = requireInstanceOf__859(codePart_950, CodePoints);
|
|
836
|
+
const value_954 = t_953.value;
|
|
837
|
+
if (! value_954) {
|
|
838
|
+
return_951 = null;
|
|
839
839
|
} else {
|
|
840
|
-
let
|
|
841
|
-
let
|
|
840
|
+
let max_955 = 0;
|
|
841
|
+
let index_956 = 0;
|
|
842
842
|
while (true) {
|
|
843
|
-
if (!(
|
|
843
|
+
if (!(value_954.length > index_956)) {
|
|
844
844
|
break;
|
|
845
845
|
}
|
|
846
|
-
const
|
|
847
|
-
if (
|
|
848
|
-
|
|
846
|
+
const next_957 = stringGet_905(value_954, index_956);
|
|
847
|
+
if (next_957 > max_955) {
|
|
848
|
+
max_955 = next_957;
|
|
849
849
|
}
|
|
850
|
-
|
|
851
|
-
|
|
850
|
+
t_952 = stringNext_906(value_954, index_956);
|
|
851
|
+
index_956 = t_952;
|
|
852
852
|
}
|
|
853
|
-
|
|
853
|
+
return_951 = max_955;
|
|
854
854
|
}
|
|
855
|
-
} else if (
|
|
856
|
-
|
|
857
|
-
} else if (Object.is(
|
|
858
|
-
|
|
859
|
-
} else if (Object.is(
|
|
860
|
-
|
|
861
|
-
} else if (Object.is(
|
|
862
|
-
|
|
855
|
+
} else if (codePart_950 instanceof CodeRange) {
|
|
856
|
+
return_951 = requireInstanceOf__859(codePart_950, CodeRange).max;
|
|
857
|
+
} else if (Object.is(codePart_950, Digit)) {
|
|
858
|
+
return_951 = Codes_892.digit9;
|
|
859
|
+
} else if (Object.is(codePart_950, Space)) {
|
|
860
|
+
return_951 = Codes_892.space;
|
|
861
|
+
} else if (Object.is(codePart_950, Word)) {
|
|
862
|
+
return_951 = Codes_892.lowerZ;
|
|
863
863
|
} else {
|
|
864
|
-
|
|
864
|
+
return_951 = null;
|
|
865
865
|
}
|
|
866
|
-
return
|
|
866
|
+
return return_951;
|
|
867
867
|
}
|
|
868
868
|
constructor() {
|
|
869
869
|
super ();
|
|
870
|
-
let
|
|
871
|
-
this.#
|
|
870
|
+
let t_958 = [""];
|
|
871
|
+
this.#out_844 = t_958;
|
|
872
872
|
return;
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
class
|
|
875
|
+
class Codes_892 extends type__735() {
|
|
876
876
|
/** @type {number} */
|
|
877
|
-
static #
|
|
877
|
+
static #ampersand_959 = 38;
|
|
878
878
|
/** @returns {number} */
|
|
879
879
|
static get ampersand() {
|
|
880
|
-
return this.#
|
|
880
|
+
return this.#ampersand_959;
|
|
881
881
|
}
|
|
882
882
|
/** @type {number} */
|
|
883
|
-
static #
|
|
883
|
+
static #backslash_960 = 92;
|
|
884
884
|
/** @returns {number} */
|
|
885
885
|
static get backslash() {
|
|
886
|
-
return this.#
|
|
886
|
+
return this.#backslash_960;
|
|
887
887
|
}
|
|
888
888
|
/** @type {number} */
|
|
889
|
-
static #
|
|
889
|
+
static #caret_961 = 94;
|
|
890
890
|
/** @returns {number} */
|
|
891
891
|
static get caret() {
|
|
892
|
-
return this.#
|
|
892
|
+
return this.#caret_961;
|
|
893
893
|
}
|
|
894
894
|
/** @type {number} */
|
|
895
|
-
static #
|
|
895
|
+
static #carriageReturn_962 = 13;
|
|
896
896
|
/** @returns {number} */
|
|
897
897
|
static get carriageReturn() {
|
|
898
|
-
return this.#
|
|
898
|
+
return this.#carriageReturn_962;
|
|
899
899
|
}
|
|
900
900
|
/** @type {number} */
|
|
901
|
-
static #
|
|
901
|
+
static #curlyLeft_963 = 123;
|
|
902
902
|
/** @returns {number} */
|
|
903
903
|
static get curlyLeft() {
|
|
904
|
-
return this.#
|
|
904
|
+
return this.#curlyLeft_963;
|
|
905
905
|
}
|
|
906
906
|
/** @type {number} */
|
|
907
|
-
static #
|
|
907
|
+
static #curlyRight_964 = 125;
|
|
908
908
|
/** @returns {number} */
|
|
909
909
|
static get curlyRight() {
|
|
910
|
-
return this.#
|
|
910
|
+
return this.#curlyRight_964;
|
|
911
911
|
}
|
|
912
912
|
/** @type {number} */
|
|
913
|
-
static #
|
|
913
|
+
static #dash_965 = 45;
|
|
914
914
|
/** @returns {number} */
|
|
915
915
|
static get dash() {
|
|
916
|
-
return this.#
|
|
916
|
+
return this.#dash_965;
|
|
917
917
|
}
|
|
918
918
|
/** @type {number} */
|
|
919
|
-
static #
|
|
919
|
+
static #dot_966 = 46;
|
|
920
920
|
/** @returns {number} */
|
|
921
921
|
static get dot() {
|
|
922
|
-
return this.#
|
|
922
|
+
return this.#dot_966;
|
|
923
923
|
}
|
|
924
924
|
/** @type {number} */
|
|
925
|
-
static #
|
|
925
|
+
static #highControlMin_967 = 127;
|
|
926
926
|
/** @returns {number} */
|
|
927
927
|
static get highControlMin() {
|
|
928
|
-
return this.#
|
|
928
|
+
return this.#highControlMin_967;
|
|
929
929
|
}
|
|
930
930
|
/** @type {number} */
|
|
931
|
-
static #
|
|
931
|
+
static #highControlMax_968 = 159;
|
|
932
932
|
/** @returns {number} */
|
|
933
933
|
static get highControlMax() {
|
|
934
|
-
return this.#
|
|
934
|
+
return this.#highControlMax_968;
|
|
935
935
|
}
|
|
936
936
|
/** @type {number} */
|
|
937
|
-
static #
|
|
937
|
+
static #digit0_969 = 48;
|
|
938
938
|
/** @returns {number} */
|
|
939
939
|
static get digit0() {
|
|
940
|
-
return this.#
|
|
940
|
+
return this.#digit0_969;
|
|
941
941
|
}
|
|
942
942
|
/** @type {number} */
|
|
943
|
-
static #
|
|
943
|
+
static #digit9_970 = 57;
|
|
944
944
|
/** @returns {number} */
|
|
945
945
|
static get digit9() {
|
|
946
|
-
return this.#
|
|
946
|
+
return this.#digit9_970;
|
|
947
947
|
}
|
|
948
948
|
/** @type {number} */
|
|
949
|
-
static #
|
|
949
|
+
static #lowerA_971 = 97;
|
|
950
950
|
/** @returns {number} */
|
|
951
951
|
static get lowerA() {
|
|
952
|
-
return this.#
|
|
952
|
+
return this.#lowerA_971;
|
|
953
953
|
}
|
|
954
954
|
/** @type {number} */
|
|
955
|
-
static #
|
|
955
|
+
static #lowerZ_972 = 122;
|
|
956
956
|
/** @returns {number} */
|
|
957
957
|
static get lowerZ() {
|
|
958
|
-
return this.#
|
|
958
|
+
return this.#lowerZ_972;
|
|
959
959
|
}
|
|
960
960
|
/** @type {number} */
|
|
961
|
-
static #
|
|
961
|
+
static #newline_973 = 10;
|
|
962
962
|
/** @returns {number} */
|
|
963
963
|
static get newline() {
|
|
964
|
-
return this.#
|
|
964
|
+
return this.#newline_973;
|
|
965
965
|
}
|
|
966
966
|
/** @type {number} */
|
|
967
|
-
static #
|
|
967
|
+
static #peso_974 = 36;
|
|
968
968
|
/** @returns {number} */
|
|
969
969
|
static get peso() {
|
|
970
|
-
return this.#
|
|
970
|
+
return this.#peso_974;
|
|
971
971
|
}
|
|
972
972
|
/** @type {number} */
|
|
973
|
-
static #
|
|
973
|
+
static #pipe_975 = 124;
|
|
974
974
|
/** @returns {number} */
|
|
975
975
|
static get pipe() {
|
|
976
|
-
return this.#
|
|
976
|
+
return this.#pipe_975;
|
|
977
977
|
}
|
|
978
978
|
/** @type {number} */
|
|
979
|
-
static #
|
|
979
|
+
static #plus_976 = 43;
|
|
980
980
|
/** @returns {number} */
|
|
981
981
|
static get plus() {
|
|
982
|
-
return this.#
|
|
982
|
+
return this.#plus_976;
|
|
983
983
|
}
|
|
984
984
|
/** @type {number} */
|
|
985
|
-
static #
|
|
985
|
+
static #question_977 = 63;
|
|
986
986
|
/** @returns {number} */
|
|
987
987
|
static get question() {
|
|
988
|
-
return this.#
|
|
988
|
+
return this.#question_977;
|
|
989
989
|
}
|
|
990
990
|
/** @type {number} */
|
|
991
|
-
static #
|
|
991
|
+
static #roundLeft_978 = 40;
|
|
992
992
|
/** @returns {number} */
|
|
993
993
|
static get roundLeft() {
|
|
994
|
-
return this.#
|
|
994
|
+
return this.#roundLeft_978;
|
|
995
995
|
}
|
|
996
996
|
/** @type {number} */
|
|
997
|
-
static #
|
|
997
|
+
static #roundRight_979 = 41;
|
|
998
998
|
/** @returns {number} */
|
|
999
999
|
static get roundRight() {
|
|
1000
|
-
return this.#
|
|
1000
|
+
return this.#roundRight_979;
|
|
1001
1001
|
}
|
|
1002
1002
|
/** @type {number} */
|
|
1003
|
-
static #
|
|
1003
|
+
static #slash_980 = 47;
|
|
1004
1004
|
/** @returns {number} */
|
|
1005
1005
|
static get slash() {
|
|
1006
|
-
return this.#
|
|
1006
|
+
return this.#slash_980;
|
|
1007
1007
|
}
|
|
1008
1008
|
/** @type {number} */
|
|
1009
|
-
static #
|
|
1009
|
+
static #squareLeft_981 = 91;
|
|
1010
1010
|
/** @returns {number} */
|
|
1011
1011
|
static get squareLeft() {
|
|
1012
|
-
return this.#
|
|
1012
|
+
return this.#squareLeft_981;
|
|
1013
1013
|
}
|
|
1014
1014
|
/** @type {number} */
|
|
1015
|
-
static #
|
|
1015
|
+
static #squareRight_982 = 93;
|
|
1016
1016
|
/** @returns {number} */
|
|
1017
1017
|
static get squareRight() {
|
|
1018
|
-
return this.#
|
|
1018
|
+
return this.#squareRight_982;
|
|
1019
1019
|
}
|
|
1020
1020
|
/** @type {number} */
|
|
1021
|
-
static #
|
|
1021
|
+
static #star_983 = 42;
|
|
1022
1022
|
/** @returns {number} */
|
|
1023
1023
|
static get star() {
|
|
1024
|
-
return this.#
|
|
1024
|
+
return this.#star_983;
|
|
1025
1025
|
}
|
|
1026
1026
|
/** @type {number} */
|
|
1027
|
-
static #
|
|
1027
|
+
static #tab_984 = 9;
|
|
1028
1028
|
/** @returns {number} */
|
|
1029
1029
|
static get tab() {
|
|
1030
|
-
return this.#
|
|
1030
|
+
return this.#tab_984;
|
|
1031
1031
|
}
|
|
1032
1032
|
/** @type {number} */
|
|
1033
|
-
static #
|
|
1033
|
+
static #tilde_985 = 42;
|
|
1034
1034
|
/** @returns {number} */
|
|
1035
1035
|
static get tilde() {
|
|
1036
|
-
return this.#
|
|
1036
|
+
return this.#tilde_985;
|
|
1037
1037
|
}
|
|
1038
1038
|
/** @type {number} */
|
|
1039
|
-
static #
|
|
1039
|
+
static #upperA_986 = 65;
|
|
1040
1040
|
/** @returns {number} */
|
|
1041
1041
|
static get upperA() {
|
|
1042
|
-
return this.#
|
|
1042
|
+
return this.#upperA_986;
|
|
1043
1043
|
}
|
|
1044
1044
|
/** @type {number} */
|
|
1045
|
-
static #
|
|
1045
|
+
static #upperZ_987 = 90;
|
|
1046
1046
|
/** @returns {number} */
|
|
1047
1047
|
static get upperZ() {
|
|
1048
|
-
return this.#
|
|
1048
|
+
return this.#upperZ_987;
|
|
1049
1049
|
}
|
|
1050
1050
|
/** @type {number} */
|
|
1051
|
-
static #
|
|
1051
|
+
static #space_988 = 32;
|
|
1052
1052
|
/** @returns {number} */
|
|
1053
1053
|
static get space() {
|
|
1054
|
-
return this.#
|
|
1054
|
+
return this.#space_988;
|
|
1055
1055
|
}
|
|
1056
1056
|
/** @type {number} */
|
|
1057
|
-
static #
|
|
1057
|
+
static #surrogateMin_989 = 55296;
|
|
1058
1058
|
/** @returns {number} */
|
|
1059
1059
|
static get surrogateMin() {
|
|
1060
|
-
return this.#
|
|
1060
|
+
return this.#surrogateMin_989;
|
|
1061
1061
|
}
|
|
1062
1062
|
/** @type {number} */
|
|
1063
|
-
static #
|
|
1063
|
+
static #surrogateMax_990 = 57343;
|
|
1064
1064
|
/** @returns {number} */
|
|
1065
1065
|
static get surrogateMax() {
|
|
1066
|
-
return this.#
|
|
1066
|
+
return this.#surrogateMax_990;
|
|
1067
1067
|
}
|
|
1068
1068
|
/** @type {number} */
|
|
1069
|
-
static #
|
|
1069
|
+
static #supplementalMin_991 = 65536;
|
|
1070
1070
|
/** @returns {number} */
|
|
1071
1071
|
static get supplementalMin() {
|
|
1072
|
-
return this.#
|
|
1072
|
+
return this.#supplementalMin_991;
|
|
1073
1073
|
}
|
|
1074
1074
|
/** @type {number} */
|
|
1075
|
-
static #
|
|
1075
|
+
static #uint16Max_992 = 65535;
|
|
1076
1076
|
/** @returns {number} */
|
|
1077
1077
|
static get uint16Max() {
|
|
1078
|
-
return this.#
|
|
1078
|
+
return this.#uint16Max_992;
|
|
1079
1079
|
}
|
|
1080
1080
|
/** @type {number} */
|
|
1081
|
-
static #
|
|
1081
|
+
static #underscore_993 = 95;
|
|
1082
1082
|
/** @returns {number} */
|
|
1083
1083
|
static get underscore() {
|
|
1084
|
-
return this.#
|
|
1084
|
+
return this.#underscore_993;
|
|
1085
1085
|
}
|
|
1086
1086
|
constructor() {
|
|
1087
1087
|
super ();
|
|
1088
1088
|
return;
|
|
1089
1089
|
}
|
|
1090
1090
|
}
|
|
1091
|
-
class
|
|
1091
|
+
class Begin_994 extends type__735(Special) {
|
|
1092
1092
|
constructor() {
|
|
1093
1093
|
super ();
|
|
1094
1094
|
return;
|
|
1095
1095
|
}
|
|
1096
1096
|
}
|
|
1097
1097
|
/** @type {Special} */
|
|
1098
|
-
export const Begin = new
|
|
1099
|
-
class
|
|
1098
|
+
export const Begin = new Begin_994();
|
|
1099
|
+
class Dot_995 extends type__735(Special) {
|
|
1100
1100
|
constructor() {
|
|
1101
1101
|
super ();
|
|
1102
1102
|
return;
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
1105
|
/** @type {Special} */
|
|
1106
|
-
export const Dot = new
|
|
1107
|
-
class
|
|
1106
|
+
export const Dot = new Dot_995();
|
|
1107
|
+
class End_996 extends type__735(Special) {
|
|
1108
1108
|
constructor() {
|
|
1109
1109
|
super ();
|
|
1110
1110
|
return;
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
1113
|
/** @type {Special} */
|
|
1114
|
-
export const End = new
|
|
1115
|
-
class
|
|
1114
|
+
export const End = new End_996();
|
|
1115
|
+
class WordBoundary_997 extends type__735(Special) {
|
|
1116
1116
|
constructor() {
|
|
1117
1117
|
super ();
|
|
1118
1118
|
return;
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
1121
|
/** @type {Special} */
|
|
1122
|
-
export const WordBoundary = new
|
|
1123
|
-
class
|
|
1122
|
+
export const WordBoundary = new WordBoundary_997();
|
|
1123
|
+
class Digit_998 extends type__735(SpecialSet) {
|
|
1124
1124
|
constructor() {
|
|
1125
1125
|
super ();
|
|
1126
1126
|
return;
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
1129
|
/** @type {SpecialSet} */
|
|
1130
|
-
export const Digit = new
|
|
1131
|
-
class
|
|
1130
|
+
export const Digit = new Digit_998();
|
|
1131
|
+
class Space_999 extends type__735(SpecialSet) {
|
|
1132
1132
|
constructor() {
|
|
1133
1133
|
super ();
|
|
1134
1134
|
return;
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
1137
|
/** @type {SpecialSet} */
|
|
1138
|
-
export const Space = new
|
|
1139
|
-
class
|
|
1138
|
+
export const Space = new Space_999();
|
|
1139
|
+
class Word_1000 extends type__735(SpecialSet) {
|
|
1140
1140
|
constructor() {
|
|
1141
1141
|
super ();
|
|
1142
1142
|
return;
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
1145
|
/** @type {SpecialSet} */
|
|
1146
|
-
export const Word = new
|
|
1146
|
+
export const Word = new Word_1000();
|
|
1147
1147
|
/** @returns {Array<number>} */
|
|
1148
|
-
function
|
|
1149
|
-
let
|
|
1150
|
-
let
|
|
1151
|
-
let
|
|
1152
|
-
let
|
|
1153
|
-
let
|
|
1154
|
-
let
|
|
1155
|
-
let
|
|
1156
|
-
let
|
|
1157
|
-
let
|
|
1158
|
-
let
|
|
1159
|
-
let
|
|
1160
|
-
let
|
|
1161
|
-
let
|
|
1162
|
-
let
|
|
1163
|
-
let
|
|
1164
|
-
let
|
|
1165
|
-
let
|
|
1166
|
-
let
|
|
1167
|
-
let
|
|
1168
|
-
let
|
|
1169
|
-
let
|
|
1170
|
-
let
|
|
1171
|
-
let
|
|
1172
|
-
let
|
|
1173
|
-
let
|
|
1174
|
-
const
|
|
1175
|
-
let
|
|
1176
|
-
while (
|
|
1177
|
-
if (
|
|
1178
|
-
|
|
1148
|
+
function buildEscapeNeeds_1001() {
|
|
1149
|
+
let t_1002;
|
|
1150
|
+
let t_1003;
|
|
1151
|
+
let t_1004;
|
|
1152
|
+
let t_1005;
|
|
1153
|
+
let t_1006;
|
|
1154
|
+
let t_1007;
|
|
1155
|
+
let t_1008;
|
|
1156
|
+
let t_1009;
|
|
1157
|
+
let t_1010;
|
|
1158
|
+
let t_1011;
|
|
1159
|
+
let t_1012;
|
|
1160
|
+
let t_1013;
|
|
1161
|
+
let t_1014;
|
|
1162
|
+
let t_1015;
|
|
1163
|
+
let t_1016;
|
|
1164
|
+
let t_1017;
|
|
1165
|
+
let t_1018;
|
|
1166
|
+
let t_1019;
|
|
1167
|
+
let t_1020;
|
|
1168
|
+
let t_1021;
|
|
1169
|
+
let t_1022;
|
|
1170
|
+
let t_1023;
|
|
1171
|
+
let t_1024;
|
|
1172
|
+
let t_1025;
|
|
1173
|
+
let t_1026;
|
|
1174
|
+
const escapeNeeds_1027 = [];
|
|
1175
|
+
let code_1028 = 0;
|
|
1176
|
+
while (code_1028 < 127) {
|
|
1177
|
+
if (code_1028 === Codes_892.dash) {
|
|
1178
|
+
t_1009 = true;
|
|
1179
1179
|
} else {
|
|
1180
|
-
if (
|
|
1181
|
-
|
|
1180
|
+
if (code_1028 === Codes_892.space) {
|
|
1181
|
+
t_1008 = true;
|
|
1182
1182
|
} else {
|
|
1183
|
-
if (
|
|
1184
|
-
|
|
1183
|
+
if (code_1028 === Codes_892.underscore) {
|
|
1184
|
+
t_1007 = true;
|
|
1185
1185
|
} else {
|
|
1186
|
-
if (
|
|
1187
|
-
|
|
1186
|
+
if (Codes_892.digit0 <= code_1028) {
|
|
1187
|
+
t_1002 = code_1028 <= Codes_892.digit9;
|
|
1188
1188
|
} else {
|
|
1189
|
-
|
|
1189
|
+
t_1002 = false;
|
|
1190
1190
|
}
|
|
1191
|
-
if (
|
|
1192
|
-
|
|
1191
|
+
if (t_1002) {
|
|
1192
|
+
t_1006 = true;
|
|
1193
1193
|
} else {
|
|
1194
|
-
if (
|
|
1195
|
-
|
|
1194
|
+
if (Codes_892.upperA <= code_1028) {
|
|
1195
|
+
t_1003 = code_1028 <= Codes_892.upperZ;
|
|
1196
1196
|
} else {
|
|
1197
|
-
|
|
1197
|
+
t_1003 = false;
|
|
1198
1198
|
}
|
|
1199
|
-
if (
|
|
1200
|
-
|
|
1199
|
+
if (t_1003) {
|
|
1200
|
+
t_1005 = true;
|
|
1201
1201
|
} else {
|
|
1202
|
-
if (
|
|
1203
|
-
|
|
1202
|
+
if (Codes_892.lowerA <= code_1028) {
|
|
1203
|
+
t_1004 = code_1028 <= Codes_892.lowerZ;
|
|
1204
1204
|
} else {
|
|
1205
|
-
|
|
1205
|
+
t_1004 = false;
|
|
1206
1206
|
}
|
|
1207
|
-
|
|
1207
|
+
t_1005 = t_1004;
|
|
1208
1208
|
}
|
|
1209
|
-
|
|
1209
|
+
t_1006 = t_1005;
|
|
1210
1210
|
}
|
|
1211
|
-
|
|
1211
|
+
t_1007 = t_1006;
|
|
1212
1212
|
}
|
|
1213
|
-
|
|
1213
|
+
t_1008 = t_1007;
|
|
1214
1214
|
}
|
|
1215
|
-
|
|
1215
|
+
t_1009 = t_1008;
|
|
1216
1216
|
}
|
|
1217
|
-
if (
|
|
1218
|
-
|
|
1217
|
+
if (t_1009) {
|
|
1218
|
+
t_1026 = 0;
|
|
1219
1219
|
} else {
|
|
1220
|
-
if (
|
|
1221
|
-
|
|
1220
|
+
if (code_1028 === Codes_892.ampersand) {
|
|
1221
|
+
t_1025 = true;
|
|
1222
1222
|
} else {
|
|
1223
|
-
if (
|
|
1224
|
-
|
|
1223
|
+
if (code_1028 === Codes_892.backslash) {
|
|
1224
|
+
t_1024 = true;
|
|
1225
1225
|
} else {
|
|
1226
|
-
if (
|
|
1227
|
-
|
|
1226
|
+
if (code_1028 === Codes_892.caret) {
|
|
1227
|
+
t_1023 = true;
|
|
1228
1228
|
} else {
|
|
1229
|
-
if (
|
|
1230
|
-
|
|
1229
|
+
if (code_1028 === Codes_892.curlyLeft) {
|
|
1230
|
+
t_1022 = true;
|
|
1231
1231
|
} else {
|
|
1232
|
-
if (
|
|
1233
|
-
|
|
1232
|
+
if (code_1028 === Codes_892.curlyRight) {
|
|
1233
|
+
t_1021 = true;
|
|
1234
1234
|
} else {
|
|
1235
|
-
if (
|
|
1236
|
-
|
|
1235
|
+
if (code_1028 === Codes_892.dot) {
|
|
1236
|
+
t_1020 = true;
|
|
1237
1237
|
} else {
|
|
1238
|
-
if (
|
|
1239
|
-
|
|
1238
|
+
if (code_1028 === Codes_892.peso) {
|
|
1239
|
+
t_1019 = true;
|
|
1240
1240
|
} else {
|
|
1241
|
-
if (
|
|
1242
|
-
|
|
1241
|
+
if (code_1028 === Codes_892.pipe) {
|
|
1242
|
+
t_1018 = true;
|
|
1243
1243
|
} else {
|
|
1244
|
-
if (
|
|
1245
|
-
|
|
1244
|
+
if (code_1028 === Codes_892.plus) {
|
|
1245
|
+
t_1017 = true;
|
|
1246
1246
|
} else {
|
|
1247
|
-
if (
|
|
1248
|
-
|
|
1247
|
+
if (code_1028 === Codes_892.question) {
|
|
1248
|
+
t_1016 = true;
|
|
1249
1249
|
} else {
|
|
1250
|
-
if (
|
|
1251
|
-
|
|
1250
|
+
if (code_1028 === Codes_892.roundLeft) {
|
|
1251
|
+
t_1015 = true;
|
|
1252
1252
|
} else {
|
|
1253
|
-
if (
|
|
1254
|
-
|
|
1253
|
+
if (code_1028 === Codes_892.roundRight) {
|
|
1254
|
+
t_1014 = true;
|
|
1255
1255
|
} else {
|
|
1256
|
-
if (
|
|
1257
|
-
|
|
1256
|
+
if (code_1028 === Codes_892.slash) {
|
|
1257
|
+
t_1013 = true;
|
|
1258
1258
|
} else {
|
|
1259
|
-
if (
|
|
1260
|
-
|
|
1259
|
+
if (code_1028 === Codes_892.squareLeft) {
|
|
1260
|
+
t_1012 = true;
|
|
1261
1261
|
} else {
|
|
1262
|
-
if (
|
|
1263
|
-
|
|
1262
|
+
if (code_1028 === Codes_892.squareRight) {
|
|
1263
|
+
t_1011 = true;
|
|
1264
1264
|
} else {
|
|
1265
|
-
if (
|
|
1266
|
-
|
|
1265
|
+
if (code_1028 === Codes_892.star) {
|
|
1266
|
+
t_1010 = true;
|
|
1267
1267
|
} else {
|
|
1268
|
-
|
|
1268
|
+
t_1010 = code_1028 === Codes_892.tilde;
|
|
1269
1269
|
}
|
|
1270
|
-
|
|
1270
|
+
t_1011 = t_1010;
|
|
1271
1271
|
}
|
|
1272
|
-
|
|
1272
|
+
t_1012 = t_1011;
|
|
1273
1273
|
}
|
|
1274
|
-
|
|
1274
|
+
t_1013 = t_1012;
|
|
1275
1275
|
}
|
|
1276
|
-
|
|
1276
|
+
t_1014 = t_1013;
|
|
1277
1277
|
}
|
|
1278
|
-
|
|
1278
|
+
t_1015 = t_1014;
|
|
1279
1279
|
}
|
|
1280
|
-
|
|
1280
|
+
t_1016 = t_1015;
|
|
1281
1281
|
}
|
|
1282
|
-
|
|
1282
|
+
t_1017 = t_1016;
|
|
1283
1283
|
}
|
|
1284
|
-
|
|
1284
|
+
t_1018 = t_1017;
|
|
1285
1285
|
}
|
|
1286
|
-
|
|
1286
|
+
t_1019 = t_1018;
|
|
1287
1287
|
}
|
|
1288
|
-
|
|
1288
|
+
t_1020 = t_1019;
|
|
1289
1289
|
}
|
|
1290
|
-
|
|
1290
|
+
t_1021 = t_1020;
|
|
1291
1291
|
}
|
|
1292
|
-
|
|
1292
|
+
t_1022 = t_1021;
|
|
1293
1293
|
}
|
|
1294
|
-
|
|
1294
|
+
t_1023 = t_1022;
|
|
1295
1295
|
}
|
|
1296
|
-
|
|
1296
|
+
t_1024 = t_1023;
|
|
1297
1297
|
}
|
|
1298
|
-
|
|
1298
|
+
t_1025 = t_1024;
|
|
1299
1299
|
}
|
|
1300
|
-
if (
|
|
1301
|
-
|
|
1300
|
+
if (t_1025) {
|
|
1301
|
+
t_1026 = 2;
|
|
1302
1302
|
} else {
|
|
1303
|
-
|
|
1303
|
+
t_1026 = 1;
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
1306
|
-
|
|
1307
|
-
|
|
1306
|
+
listBuilderAdd_1029(escapeNeeds_1027, t_1026);
|
|
1307
|
+
code_1028 = code_1028 + 1 | 0;
|
|
1308
1308
|
}
|
|
1309
|
-
return
|
|
1309
|
+
return listBuilderToList_1030(escapeNeeds_1027);
|
|
1310
1310
|
}
|
|
1311
1311
|
/** @type {Array<number>} */
|
|
1312
|
-
const
|
|
1313
|
-
/** @type {
|
|
1314
|
-
const
|
|
1312
|
+
const escapeNeeds_895 = buildEscapeNeeds_1001();
|
|
1313
|
+
/** @type {RegexRefs_795} */
|
|
1314
|
+
const regexRefs_835 = new RegexRefs_795();
|
|
1315
1315
|
/**
|
|
1316
|
-
* @param {RegexNode}
|
|
1316
|
+
* @param {RegexNode} item_1031
|
|
1317
1317
|
* @returns {RegexNode}
|
|
1318
1318
|
*/
|
|
1319
|
-
export function entire(
|
|
1320
|
-
return new Sequence(Object.freeze([Begin,
|
|
1319
|
+
export function entire(item_1031) {
|
|
1320
|
+
return new Sequence(Object.freeze([Begin, item_1031, End]));
|
|
1321
1321
|
};
|
|
1322
1322
|
/**
|
|
1323
|
-
* @param {RegexNode}
|
|
1324
|
-
* @param {boolean | null} [
|
|
1323
|
+
* @param {RegexNode} item_1032
|
|
1324
|
+
* @param {boolean | null} [reluctant_1033]
|
|
1325
1325
|
* @returns {Repeat}
|
|
1326
1326
|
*/
|
|
1327
|
-
export function oneOrMore(
|
|
1328
|
-
let
|
|
1329
|
-
if (
|
|
1330
|
-
|
|
1327
|
+
export function oneOrMore(item_1032, reluctant_1033) {
|
|
1328
|
+
let reluctant_1034;
|
|
1329
|
+
if (reluctant_1033 == null) {
|
|
1330
|
+
reluctant_1034 = false;
|
|
1331
1331
|
} else {
|
|
1332
|
-
|
|
1332
|
+
reluctant_1034 = reluctant_1033;
|
|
1333
1333
|
}
|
|
1334
|
-
return new Repeat(
|
|
1334
|
+
return new Repeat(item_1032, 1, null, reluctant_1034);
|
|
1335
1335
|
};
|
|
1336
1336
|
/**
|
|
1337
|
-
* @param {RegexNode}
|
|
1338
|
-
* @param {boolean | null} [
|
|
1337
|
+
* @param {RegexNode} item_1035
|
|
1338
|
+
* @param {boolean | null} [reluctant_1036]
|
|
1339
1339
|
* @returns {Repeat}
|
|
1340
1340
|
*/
|
|
1341
|
-
export function optional(
|
|
1342
|
-
let
|
|
1343
|
-
if (
|
|
1344
|
-
|
|
1341
|
+
export function optional(item_1035, reluctant_1036) {
|
|
1342
|
+
let reluctant_1037;
|
|
1343
|
+
if (reluctant_1036 == null) {
|
|
1344
|
+
reluctant_1037 = false;
|
|
1345
1345
|
} else {
|
|
1346
|
-
|
|
1346
|
+
reluctant_1037 = reluctant_1036;
|
|
1347
1347
|
}
|
|
1348
|
-
return new Repeat(
|
|
1348
|
+
return new Repeat(item_1035, 0, 1, reluctant_1037);
|
|
1349
1349
|
};
|