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