@temperlang/std 0.0.5 → 0.1.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/regex.js CHANGED
@@ -1,71 +1,46 @@
1
1
  import {
2
- InterfaceType as InterfaceType_1, listify as listify_2, compiledRegexCompileFormatted as compiledRegexCompileFormatted_3, compiledRegexCompiledFound as compiledRegexCompiledFound_4, compiledRegexCompiledFind as compiledRegexCompiledFind_5, compiledRegexCompiledReplace as compiledRegexCompiledReplace_6, listJoin as listJoin_7, eqGeneric as eqGeneric_8, listBuilderAdd as listBuilderAdd_9, strCat as strCat_10, regexFormatterPushCodeTo as regexFormatterPushCodeTo_11, stringCodePoints as stringCodePoints_12, regexFormatterAdjustCodeSet as regexFormatterAdjustCodeSet_13, ltGeneric as ltGeneric_14, listGet as listGet_15, eqGeneric as eqGeneric_16, intToString as intToString_17, neGeneric as neGeneric_18, gtGeneric as gtGeneric_19, requireInstanceOf as requireInstanceOf__182, noResultException as noResultException__184, requireIsSafeInteger as requireIsSafeInteger__274
2
+ InterfaceType as InterfaceType_65, requireInstanceOf as requireInstanceOf__178, requireIsSafeInteger as requireIsSafeInteger__253, compiledRegexCompileFormatted as compiledRegexCompileFormatted_139, compiledRegexCompiledFound as compiledRegexCompiledFound_143, compiledRegexCompiledFind as compiledRegexCompiledFind_146, compiledRegexCompiledReplace as compiledRegexCompiledReplace_151, eqGeneric as eqGeneric_180, regexFormatterPushCodeTo as regexFormatterPushCodeTo_194, stringCodePoints as stringCodePoints_201, regexFormatterAdjustCodeSet as regexFormatterAdjustCodeSet_218, intToString as intToString_252, listify as listify_42, listJoin as listJoin_24, listBuilderAdd as listBuilderAdd_4, strCat as strCat_57, listGet as listGet_53
3
3
  } from "@temperlang/core";
4
- function methodCompiled20() {
5
- let return_21;
6
- let t_22 = new CompiledRegex(this);
7
- return_21 = t_22;
8
- return return_21;
4
+ function methodCompiled66() {
5
+ return new CompiledRegex(this);
9
6
  }
10
- function methodFound23(text_24) {
11
- let return_25;
12
- let t_26 = this.compiled();
13
- let t_27 = t_26.found(text_24);
14
- return_25 = t_27;
15
- return return_25;
7
+ function methodFound67(text_68) {
8
+ return this.compiled().found(text_68);
16
9
  }
17
- function methodFind28(text_29) {
18
- let return_30;
19
- let t_31;
20
- let t_32 = this.compiled();
21
- {
22
- t_31 = t_32.find(text_29);
23
- return_30 = t_31;
24
- }
25
- return return_30;
10
+ function methodFind69(text_70) {
11
+ return this.compiled().find(text_70);
26
12
  }
27
- function methodReplace33(text_34, format_35) {
28
- let return_36;
29
- let t_37 = this.compiled();
30
- let t_38 = t_37.replace(text_34, format_35);
31
- return_36 = t_38;
32
- return return_36;
13
+ function methodReplace71(text_72, format_73) {
14
+ return this.compiled().replace(text_72, format_73);
33
15
  }
34
16
  /**
35
17
  * @typedef {{
36
- * compiled: () => CompiledRegex, found: (text_24: string) => boolean, find: (text_29: string) => "Unsupported type: Map\u003cString, Group\u003e | NoResult", replace: (text_34: string, format_35: (arg0: Map<string, Group>) => string) => string
18
+ * compiled: () => CompiledRegex, found: (text_68: string) => boolean, find: (text_70: string) => Map<string, Group>, replace: (text_72: string, format_73: (arg0: Map<string, Group>) => string) => string
37
19
  * }}
38
20
  * Regex
39
21
  */
40
- export const Regex = new InterfaceType_1("Regex", [["m", "compiled", methodCompiled20], ["m", "found", methodFound23], ["m", "find", methodFind28], ["m", "replace", methodReplace33]], [], 1);
41
- ;
22
+ export const Regex = new InterfaceType_65("Regex", [["m", "compiled", methodCompiled66], ["m", "found", methodFound67], ["m", "find", methodFind69], ["m", "replace", methodReplace71]], [], 1);
42
23
  export class Capture {
43
24
  /** @type {string} */
44
- #name_39;
25
+ #name_74;
45
26
  /** @type {Regex} */
46
- #item_40;
27
+ #item_75;
47
28
  /**
48
- * @param {string} name_41
49
- * @param {Regex} item_42
29
+ * @param {string} name_76
30
+ * @param {Regex} item_77
50
31
  */
51
- constructor(name_41, item_42) {
52
- let return_43;
53
- return_43 = void 0;
54
- this.#name_39 = name_41;
55
- this.#item_40 = item_42;
32
+ constructor(name_76, item_77) {
33
+ this.#name_74 = name_76;
34
+ this.#item_75 = item_77;
56
35
  return;
57
36
  }
58
37
  /** @returns {string} */
59
38
  get name() {
60
- let return_45;
61
- return_45 = this.#name_39;
62
- return return_45;
39
+ return this.#name_74;
63
40
  }
64
41
  /** @returns {Regex} */
65
42
  get item() {
66
- let return_47;
67
- return_47 = this.#item_40;
68
- return return_47;
43
+ return this.#item_75;
69
44
  }
70
45
  };
71
46
  Regex.implementedBy(Capture);
@@ -73,23 +48,18 @@ Regex.implementedBy(Capture);
73
48
  * @typedef {{}}
74
49
  * CodePart
75
50
  */
76
- export const CodePart = new InterfaceType_1("CodePart", [], [Regex], 2);
77
- ;
51
+ export const CodePart = new InterfaceType_65("CodePart", [], [Regex], 2);
78
52
  export class CodePoints {
79
53
  /** @type {string} */
80
- #value_48;
81
- /** @param {string} value_49 */
82
- constructor(value_49) {
83
- let return_50;
84
- return_50 = void 0;
85
- this.#value_48 = value_49;
54
+ #value_80;
55
+ /** @param {string} value_81 */
56
+ constructor(value_81) {
57
+ this.#value_80 = value_81;
86
58
  return;
87
59
  }
88
60
  /** @returns {string} */
89
61
  get value() {
90
- let return_52;
91
- return_52 = this.#value_48;
92
- return return_52;
62
+ return this.#value_80;
93
63
  }
94
64
  };
95
65
  CodePart.implementedBy(CodePoints);
@@ -97,324 +67,256 @@ CodePart.implementedBy(CodePoints);
97
67
  * @typedef {{}}
98
68
  * Special
99
69
  */
100
- export const Special = new InterfaceType_1("Special", [], [Regex], 2);
101
- ;
70
+ export const Special = new InterfaceType_65("Special", [], [Regex], 2);
102
71
  /**
103
72
  * @typedef {{}}
104
73
  * SpecialSet
105
74
  */
106
- export const SpecialSet = new InterfaceType_1("SpecialSet", [], [CodePart, Special], 3);
107
- ;
75
+ export const SpecialSet = new InterfaceType_65("SpecialSet", [], [CodePart, Special], 3);
108
76
  export class CodeRange {
109
77
  /** @type {number} */
110
- #min_53;
78
+ #min_83;
111
79
  /** @type {number} */
112
- #max_54;
80
+ #max_84;
113
81
  /**
114
- * @param {number} min_55
115
- * @param {number} max_56
82
+ * @param {number} min_85
83
+ * @param {number} max_86
116
84
  */
117
- constructor(min_55, max_56) {
118
- let return_57;
119
- return_57 = void 0;
120
- this.#min_53 = min_55;
121
- this.#max_54 = max_56;
85
+ constructor(min_85, max_86) {
86
+ this.#min_83 = min_85;
87
+ this.#max_84 = max_86;
122
88
  return;
123
89
  }
124
90
  /** @returns {number} */
125
91
  get min() {
126
- let return_59;
127
- return_59 = this.#min_53;
128
- return return_59;
92
+ return this.#min_83;
129
93
  }
130
94
  /** @returns {number} */
131
95
  get max() {
132
- let return_61;
133
- return_61 = this.#max_54;
134
- return return_61;
96
+ return this.#max_84;
135
97
  }
136
98
  };
137
99
  CodePart.implementedBy(CodeRange);
138
100
  export class CodeSet {
139
101
  /** @type {Array<CodePart>} */
140
- #items_62;
102
+ #items_89;
141
103
  /** @type {boolean} */
142
- #negated_63;
104
+ #negated_90;
143
105
  /**
144
- * @param {Array<CodePart>} items_64
145
- * @param {boolean} negated_65
106
+ * @param {Array<CodePart>} items_91
107
+ * @param {boolean} negated_92
146
108
  */
147
- constructor(items_64, negated_65) {
148
- let return_66;
149
- return_66 = void 0;
150
- if (!(negated_65 !== void 0)) {
151
- negated_65 = false;
109
+ constructor(items_91, negated_92) {
110
+ if (!(negated_92 !== void 0)) {
111
+ negated_92 = false;
152
112
  }
153
- this.#items_62 = items_64;
154
- this.#negated_63 = negated_65;
113
+ this.#items_89 = items_91;
114
+ this.#negated_90 = negated_92;
155
115
  return;
156
116
  }
157
117
  /** @returns {Array<CodePart>} */
158
118
  get items() {
159
- let return_68;
160
- return_68 = this.#items_62;
161
- return return_68;
119
+ return this.#items_89;
162
120
  }
163
121
  /** @returns {boolean} */
164
122
  get negated() {
165
- let return_70;
166
- return_70 = this.#negated_63;
167
- return return_70;
123
+ return this.#negated_90;
168
124
  }
169
125
  };
170
126
  Regex.implementedBy(CodeSet);
171
127
  export class Or {
172
128
  /** @type {Array<Regex>} */
173
- #items_71;
174
- /** @param {Array<Regex>} items_72 */
175
- constructor(items_72) {
176
- let return_73;
177
- return_73 = void 0;
178
- this.#items_71 = items_72;
129
+ #items_95;
130
+ /** @param {Array<Regex>} items_96 */
131
+ constructor(items_96) {
132
+ this.#items_95 = items_96;
179
133
  return;
180
134
  }
181
135
  /** @returns {Array<Regex>} */
182
136
  get items() {
183
- let return_75;
184
- return_75 = this.#items_71;
185
- return return_75;
137
+ return this.#items_95;
186
138
  }
187
139
  };
188
140
  Regex.implementedBy(Or);
189
141
  export class Repeat {
190
142
  /** @type {Regex} */
191
- #item_76;
143
+ #item_98;
192
144
  /** @type {number} */
193
- #min_77;
194
- /** @type {"Unsupported type: Int | Null"} */
195
- #max_78;
145
+ #min_99;
146
+ /** @type {number | null} */
147
+ #max_100;
196
148
  /** @type {boolean} */
197
- #reluctant_79;
149
+ #reluctant_101;
198
150
  /**
199
- * @param {Regex} item_80
200
- * @param {number} min_81
201
- * @param {"Unsupported type: Int | Null"} max_82
202
- * @param {boolean} reluctant_83
151
+ * @param {Regex} item_102
152
+ * @param {number} min_103
153
+ * @param {number | null} max_104
154
+ * @param {boolean} reluctant_105
203
155
  */
204
- constructor(item_80, min_81, max_82, reluctant_83) {
205
- let return_84;
206
- return_84 = void 0;
207
- if (!(reluctant_83 !== void 0)) {
208
- reluctant_83 = false;
156
+ constructor(item_102, min_103, max_104, reluctant_105) {
157
+ if (!(reluctant_105 !== void 0)) {
158
+ reluctant_105 = false;
209
159
  }
210
- this.#item_76 = item_80;
211
- this.#min_77 = min_81;
212
- this.#max_78 = max_82;
213
- this.#reluctant_79 = reluctant_83;
160
+ this.#item_98 = item_102;
161
+ this.#min_99 = min_103;
162
+ this.#max_100 = max_104;
163
+ this.#reluctant_101 = reluctant_105;
214
164
  return;
215
165
  }
216
166
  /** @returns {Regex} */
217
167
  get item() {
218
- let return_86;
219
- return_86 = this.#item_76;
220
- return return_86;
168
+ return this.#item_98;
221
169
  }
222
170
  /** @returns {number} */
223
171
  get min() {
224
- let return_88;
225
- return_88 = this.#min_77;
226
- return return_88;
172
+ return this.#min_99;
227
173
  }
228
- /** @returns {"Unsupported type: Int | Null"} */
174
+ /** @returns {number | null} */
229
175
  get max() {
230
- let return_90;
231
- return_90 = this.#max_78;
232
- return return_90;
176
+ return this.#max_100;
233
177
  }
234
178
  /** @returns {boolean} */
235
179
  get reluctant() {
236
- let return_92;
237
- return_92 = this.#reluctant_79;
238
- return return_92;
180
+ return this.#reluctant_101;
239
181
  }
240
182
  };
241
183
  Regex.implementedBy(Repeat);
242
184
  export class Sequence {
243
185
  /** @type {Array<Regex>} */
244
- #items_93;
245
- /** @param {Array<Regex>} items_94 */
246
- constructor(items_94) {
247
- let return_95;
248
- return_95 = void 0;
249
- this.#items_93 = items_94;
186
+ #items_110;
187
+ /** @param {Array<Regex>} items_111 */
188
+ constructor(items_111) {
189
+ this.#items_110 = items_111;
250
190
  return;
251
191
  }
252
192
  /** @returns {Array<Regex>} */
253
193
  get items() {
254
- let return_97;
255
- return_97 = this.#items_93;
256
- return return_97;
194
+ return this.#items_110;
257
195
  }
258
196
  };
259
197
  Regex.implementedBy(Sequence);
260
198
  export class Group {
261
199
  /** @type {string} */
262
- #name_98;
200
+ #name_113;
263
201
  /** @type {string} */
264
- #value_99;
202
+ #value_114;
265
203
  /** @type {number} */
266
- #codePointsBegin_100;
204
+ #codePointsBegin_115;
267
205
  /**
268
- * @param {string} name_101
269
- * @param {string} value_102
270
- * @param {number} codePointsBegin_103
206
+ * @param {string} name_116
207
+ * @param {string} value_117
208
+ * @param {number} codePointsBegin_118
271
209
  */
272
- constructor(name_101, value_102, codePointsBegin_103) {
273
- let return_104;
274
- return_104 = void 0;
275
- this.#name_98 = name_101;
276
- this.#value_99 = value_102;
277
- this.#codePointsBegin_100 = codePointsBegin_103;
210
+ constructor(name_116, value_117, codePointsBegin_118) {
211
+ this.#name_113 = name_116;
212
+ this.#value_114 = value_117;
213
+ this.#codePointsBegin_115 = codePointsBegin_118;
278
214
  return;
279
215
  }
280
216
  /** @returns {string} */
281
217
  get name() {
282
- let return_106;
283
- return_106 = this.#name_98;
284
- return return_106;
218
+ return this.#name_113;
285
219
  }
286
220
  /** @returns {string} */
287
221
  get value() {
288
- let return_108;
289
- return_108 = this.#value_99;
290
- return return_108;
222
+ return this.#value_114;
291
223
  }
292
224
  /** @returns {number} */
293
225
  get codePointsBegin() {
294
- let return_110;
295
- return_110 = this.#codePointsBegin_100;
296
- return return_110;
226
+ return this.#codePointsBegin_115;
297
227
  }
298
228
  };
299
- class RegexRefs_111 {
229
+ class RegexRefs_122 {
300
230
  /** @type {CodePoints} */
301
- #codePoints_112;
231
+ #codePoints_123;
302
232
  /** @type {Group} */
303
- #group_113;
233
+ #group_124;
304
234
  /** @type {Or} */
305
- #orObject_114;
235
+ #orObject_125;
306
236
  /**
307
- * @param {CodePoints} codePoints_115
308
- * @param {Group} group_116
309
- * @param {Or} orObject_117
237
+ * @param {CodePoints} codePoints_126
238
+ * @param {Group} group_127
239
+ * @param {Or} orObject_128
310
240
  */
311
- constructor(codePoints_115, group_116, orObject_117) {
312
- let return_118;
313
- let t_119;
314
- let t_120;
315
- let t_121;
316
- return_118 = void 0;
317
- if (!(codePoints_115 !== void 0)) {
318
- t_119 = new CodePoints("");
319
- codePoints_115 = t_119;
241
+ constructor(codePoints_126, group_127, orObject_128) {
242
+ let t_129;
243
+ let t_130;
244
+ let t_131;
245
+ if (!(codePoints_126 !== void 0)) {
246
+ t_129 = new CodePoints("");
247
+ codePoints_126 = t_129;
320
248
  }
321
- if (!(group_116 !== void 0)) {
322
- t_120 = new Group("", "", 0);
323
- group_116 = t_120;
249
+ if (!(group_127 !== void 0)) {
250
+ t_130 = new Group("", "", 0);
251
+ group_127 = t_130;
324
252
  }
325
- if (!(orObject_117 !== void 0)) {
326
- t_121 = new Or(listify_2());
327
- orObject_117 = t_121;
253
+ if (!(orObject_128 !== void 0)) {
254
+ t_131 = new Or(listify_42());
255
+ orObject_128 = t_131;
328
256
  }
329
- this.#codePoints_112 = codePoints_115;
330
- this.#group_113 = group_116;
331
- this.#orObject_114 = orObject_117;
257
+ this.#codePoints_123 = codePoints_126;
258
+ this.#group_124 = group_127;
259
+ this.#orObject_125 = orObject_128;
332
260
  return;
333
261
  }
334
262
  /** @returns {CodePoints} */
335
263
  get codePoints() {
336
- let return_123;
337
- return_123 = this.#codePoints_112;
338
- return return_123;
264
+ return this.#codePoints_123;
339
265
  }
340
266
  /** @returns {Group} */
341
267
  get group() {
342
- let return_125;
343
- return_125 = this.#group_113;
344
- return return_125;
268
+ return this.#group_124;
345
269
  }
346
270
  /** @returns {Or} */
347
271
  get orObject() {
348
- let return_127;
349
- return_127 = this.#orObject_114;
350
- return return_127;
272
+ return this.#orObject_125;
351
273
  }
352
274
  }
353
275
  export class CompiledRegex {
354
276
  /** @type {Regex} */
355
- #data_128;
356
- /** @param {Regex} data_129 */
357
- constructor(data_129) {
358
- let return_130;
359
- return_130 = void 0;
360
- this.#data_128 = data_129;
361
- let t_131 = this.format();
362
- let t_132 = compiledRegexCompileFormatted_3(this, t_131);
363
- this.#compiled_133 = t_132;
277
+ #data_135;
278
+ /** @param {Regex} data_136 */
279
+ constructor(data_136) {
280
+ this.#data_135 = data_136;
281
+ let t_137 = this.format();
282
+ let t_138 = compiledRegexCompileFormatted_139(this, t_137);
283
+ this.#compiled_140 = t_138;
364
284
  return;
365
285
  }
366
286
  /**
367
- * @param {string} text_135
287
+ * @param {string} text_142
368
288
  * @returns {boolean}
369
289
  */
370
- found(text_135) {
371
- let return_136;
372
- let t_137 = compiledRegexCompiledFound_4(this, this.#compiled_133, text_135);
373
- return_136 = t_137;
374
- return return_136;
290
+ found(text_142) {
291
+ return compiledRegexCompiledFound_143(this, this.#compiled_140, text_142);
375
292
  }
376
293
  /**
377
- * @param {string} text_139
378
- * @returns {"Unsupported type: Map\u003cString, Group\u003e | NoResult"}
294
+ * @param {string} text_145
295
+ * @returns {Map<string, Group>}
379
296
  */
380
- find(text_139) {
381
- let return_140;
382
- let t_141;
383
- {
384
- t_141 = compiledRegexCompiledFind_5(this, this.#compiled_133, text_139, regexRefs_142);
385
- return_140 = t_141;
386
- }
387
- return return_140;
297
+ find(text_145) {
298
+ return compiledRegexCompiledFind_146(this, this.#compiled_140, text_145, regexRefs_147);
388
299
  }
389
300
  /**
390
- * @param {string} text_144
391
- * @param {(arg0: Map<string, Group>) => string} format_145
301
+ * @param {string} text_149
302
+ * @param {(arg0: Map<string, Group>) => string} format_150
392
303
  * @returns {string}
393
304
  */
394
- replace(text_144, format_145) {
395
- let return_146;
396
- let t_147 = compiledRegexCompiledReplace_6(this, this.#compiled_133, text_144, format_145, regexRefs_142);
397
- return_146 = t_147;
398
- return return_146;
305
+ replace(text_149, format_150) {
306
+ return compiledRegexCompiledReplace_151(this, this.#compiled_140, text_149, format_150, regexRefs_147);
399
307
  }
400
308
  /** @type {unknown} */
401
- #compiled_133;
309
+ #compiled_140;
402
310
  /** @returns {string} */
403
311
  format() {
404
- let return_149;
405
- let t_150 = new RegexFormatter_151();
406
- let t_152 = t_150.format(this.#data_128);
407
- return_149 = t_152;
408
- return return_149;
312
+ return new RegexFormatter_153().format(this.#data_135);
409
313
  }
410
314
  /** @returns {Regex} */
411
315
  get data() {
412
- let return_154;
413
- return_154 = this.#data_128;
414
- return return_154;
316
+ return this.#data_135;
415
317
  }
416
318
  };
417
- class RegexFormatter_151 {
319
+ class RegexFormatter_153 {
418
320
  /** @type {Array<string>} */
419
321
  #out_155;
420
322
  /**
@@ -422,26 +324,20 @@ class RegexFormatter_151 {
422
324
  * @returns {string}
423
325
  */
424
326
  format(regex_157) {
425
- let return_158;
426
327
  this.pushRegex(regex_157);
427
- let t_159 = this.#out_155;
428
- function fn_160(x_161) {
429
- let return_162;
430
- return_162 = x_161;
431
- return return_162;
328
+ let t_158 = this.#out_155;
329
+ function fn_159(x_160) {
330
+ return x_160;
432
331
  }
433
- let t_163 = fn_160;
434
- let t_164 = listJoin_7(t_159, "", t_163);
435
- return_158 = t_164;
436
- return return_158;
332
+ return listJoin_24(t_158, "", fn_159);
437
333
  }
438
- /**
439
- * @param {Regex} regex_166
440
- * @returns {void}
441
- */
442
- pushRegex(regex_166) {
443
- let return_167;
444
- return_167 = void 0;
334
+ /** @param {Regex} regex_162 */
335
+ pushRegex(regex_162) {
336
+ let return_163;
337
+ let t_164;
338
+ let t_165;
339
+ let t_166;
340
+ let t_167;
445
341
  let t_168;
446
342
  let t_169;
447
343
  let t_170;
@@ -452,150 +348,148 @@ class RegexFormatter_151 {
452
348
  let t_175;
453
349
  let t_176;
454
350
  let t_177;
455
- let t_178;
456
- let t_179;
457
- let t_180;
458
- let t_181;
459
351
  try {
460
- requireInstanceOf__182(regex_166, Capture);
461
- t_168 = true;
352
+ requireInstanceOf__178(regex_162, Capture);
353
+ t_164 = true;
462
354
  } catch {
463
- t_168 = false;
355
+ t_164 = false;
464
356
  }
465
- s__1217_183: {
466
- if (t_168) {
357
+ s__1259_179: {
358
+ if (t_164) {
467
359
  try {
468
- t_169 = requireInstanceOf__182(regex_166, Capture);
360
+ t_165 = requireInstanceOf__178(regex_162, Capture);
469
361
  } catch {
470
- break s__1217_183;
362
+ break s__1259_179;
471
363
  }
472
- this.pushCapture(t_169);
364
+ this.pushCapture(t_165);
473
365
  } else {
474
366
  try {
475
- requireInstanceOf__182(regex_166, CodePoints);
476
- t_170 = true;
367
+ requireInstanceOf__178(regex_162, CodePoints);
368
+ t_166 = true;
477
369
  } catch {
478
- t_170 = false;
370
+ t_166 = false;
479
371
  }
480
- if (t_170) {
372
+ if (t_166) {
481
373
  try {
482
- t_171 = requireInstanceOf__182(regex_166, CodePoints);
374
+ t_167 = requireInstanceOf__178(regex_162, CodePoints);
483
375
  } catch {
484
- break s__1217_183;
376
+ break s__1259_179;
485
377
  }
486
- this.pushCodePoints(t_171, false);
378
+ this.pushCodePoints(t_167, false);
487
379
  } else {
488
380
  try {
489
- requireInstanceOf__182(regex_166, CodeRange);
490
- t_172 = true;
381
+ requireInstanceOf__178(regex_162, CodeRange);
382
+ t_168 = true;
491
383
  } catch {
492
- t_172 = false;
384
+ t_168 = false;
493
385
  }
494
- if (t_172) {
386
+ if (t_168) {
495
387
  try {
496
- t_173 = requireInstanceOf__182(regex_166, CodeRange);
388
+ t_169 = requireInstanceOf__178(regex_162, CodeRange);
497
389
  } catch {
498
- break s__1217_183;
390
+ break s__1259_179;
499
391
  }
500
- this.pushCodeRange(t_173);
392
+ this.pushCodeRange(t_169);
501
393
  } else {
502
394
  try {
503
- requireInstanceOf__182(regex_166, CodeSet);
504
- t_174 = true;
395
+ requireInstanceOf__178(regex_162, CodeSet);
396
+ t_170 = true;
505
397
  } catch {
506
- t_174 = false;
398
+ t_170 = false;
507
399
  }
508
- if (t_174) {
400
+ if (t_170) {
509
401
  try {
510
- t_175 = requireInstanceOf__182(regex_166, CodeSet);
402
+ t_171 = requireInstanceOf__178(regex_162, CodeSet);
511
403
  } catch {
512
- break s__1217_183;
404
+ break s__1259_179;
513
405
  }
514
- this.pushCodeSet(t_175);
406
+ this.pushCodeSet(t_171);
515
407
  } else {
516
408
  try {
517
- requireInstanceOf__182(regex_166, Or);
518
- t_176 = true;
409
+ requireInstanceOf__178(regex_162, Or);
410
+ t_172 = true;
519
411
  } catch {
520
- t_176 = false;
412
+ t_172 = false;
521
413
  }
522
- if (t_176) {
414
+ if (t_172) {
523
415
  try {
524
- t_177 = requireInstanceOf__182(regex_166, Or);
416
+ t_173 = requireInstanceOf__178(regex_162, Or);
525
417
  } catch {
526
- break s__1217_183;
418
+ break s__1259_179;
527
419
  }
528
- this.pushOr(t_177);
420
+ this.pushOr(t_173);
529
421
  } else {
530
422
  try {
531
- requireInstanceOf__182(regex_166, Repeat);
532
- t_178 = true;
423
+ requireInstanceOf__178(regex_162, Repeat);
424
+ t_174 = true;
533
425
  } catch {
534
- t_178 = false;
426
+ t_174 = false;
535
427
  }
536
- if (t_178) {
428
+ if (t_174) {
537
429
  try {
538
- t_179 = requireInstanceOf__182(regex_166, Repeat);
430
+ t_175 = requireInstanceOf__178(regex_162, Repeat);
539
431
  } catch {
540
- break s__1217_183;
432
+ break s__1259_179;
541
433
  }
542
- this.pushRepeat(t_179);
434
+ this.pushRepeat(t_175);
543
435
  } else {
544
436
  try {
545
- requireInstanceOf__182(regex_166, Sequence);
546
- t_180 = true;
437
+ requireInstanceOf__178(regex_162, Sequence);
438
+ t_176 = true;
547
439
  } catch {
548
- t_180 = false;
440
+ t_176 = false;
549
441
  }
550
- if (t_180) {
442
+ if (t_176) {
551
443
  try {
552
- t_181 = requireInstanceOf__182(regex_166, Sequence);
444
+ t_177 = requireInstanceOf__178(regex_162, Sequence);
553
445
  } catch {
554
- break s__1217_183;
446
+ break s__1259_179;
555
447
  }
556
- this.pushSequence(t_181);
557
- } else if (eqGeneric_8(regex_166, Begin)) {
448
+ this.pushSequence(t_177);
449
+ } else if (eqGeneric_180(regex_162, Begin)) {
558
450
  try {
559
- listBuilderAdd_9(this.#out_155, "^");
451
+ listBuilderAdd_4(this.#out_155, "^");
560
452
  } catch {
561
- break s__1217_183;
453
+ break s__1259_179;
562
454
  }
563
- } else if (eqGeneric_8(regex_166, Dot)) {
455
+ } else if (eqGeneric_180(regex_162, Dot)) {
564
456
  try {
565
- listBuilderAdd_9(this.#out_155, ".");
457
+ listBuilderAdd_4(this.#out_155, ".");
566
458
  } catch {
567
- break s__1217_183;
459
+ break s__1259_179;
568
460
  }
569
- } else if (eqGeneric_8(regex_166, End)) {
461
+ } else if (eqGeneric_180(regex_162, End)) {
570
462
  try {
571
- listBuilderAdd_9(this.#out_155, "\u0024");
463
+ listBuilderAdd_4(this.#out_155, "\u0024");
572
464
  } catch {
573
- break s__1217_183;
465
+ break s__1259_179;
574
466
  }
575
- } else if (eqGeneric_8(regex_166, WordBoundary)) {
467
+ } else if (eqGeneric_180(regex_162, WordBoundary)) {
576
468
  try {
577
- listBuilderAdd_9(this.#out_155, "\\b");
469
+ listBuilderAdd_4(this.#out_155, "\\b");
578
470
  } catch {
579
- break s__1217_183;
471
+ break s__1259_179;
580
472
  }
581
- } else if (eqGeneric_8(regex_166, Digit)) {
473
+ } else if (eqGeneric_180(regex_162, Digit)) {
582
474
  try {
583
- listBuilderAdd_9(this.#out_155, "\\d");
475
+ listBuilderAdd_4(this.#out_155, "\\d");
584
476
  } catch {
585
- break s__1217_183;
477
+ break s__1259_179;
586
478
  }
587
- } else if (eqGeneric_8(regex_166, Space)) {
479
+ } else if (eqGeneric_180(regex_162, Space)) {
588
480
  try {
589
- listBuilderAdd_9(this.#out_155, "\\s");
481
+ listBuilderAdd_4(this.#out_155, "\\s");
590
482
  } catch {
591
- break s__1217_183;
483
+ break s__1259_179;
592
484
  }
593
- } else if (eqGeneric_8(regex_166, Word)) {
485
+ } else if (eqGeneric_180(regex_162, Word)) {
594
486
  try {
595
- listBuilderAdd_9(this.#out_155, "\\w");
487
+ listBuilderAdd_4(this.#out_155, "\\w");
596
488
  } catch {
597
- break s__1217_183;
489
+ break s__1259_179;
598
490
  }
491
+ } else {
492
+ void 0;
599
493
  }
600
494
  }
601
495
  }
@@ -603,698 +497,576 @@ class RegexFormatter_151 {
603
497
  }
604
498
  }
605
499
  }
606
- return return_167;
500
+ return_163 = void 0;
501
+ return return_163;
607
502
  }
608
- throw noResultException__184;
503
+ throw Error();
609
504
  }
610
- /**
611
- * @param {Capture} capture_186
612
- * @returns {void}
613
- */
614
- pushCapture(capture_186) {
615
- let return_187;
616
- let t_188;
617
- let t_189;
618
- return_187 = void 0;
619
- let t_190;
505
+ /** @param {Capture} capture_182 */
506
+ pushCapture(capture_182) {
507
+ let return_183;
508
+ let t_184;
509
+ let t_185;
510
+ let t_186;
620
511
  {
621
- listBuilderAdd_9(this.#out_155, "(");
622
- t_190 = this.#out_155;
623
- t_188 = capture_186.name;
624
- this.pushCaptureName(t_190, t_188);
625
- t_189 = capture_186.item;
626
- this.pushRegex(t_189);
627
- listBuilderAdd_9(this.#out_155, ")");
512
+ listBuilderAdd_4(this.#out_155, "(");
513
+ t_186 = this.#out_155;
514
+ t_184 = capture_182.name;
515
+ this.pushCaptureName(t_186, t_184);
516
+ t_185 = capture_182.item;
517
+ this.pushRegex(t_185);
518
+ listBuilderAdd_4(this.#out_155, ")");
519
+ return_183 = void 0;
628
520
  }
629
- return return_187;
521
+ return return_183;
630
522
  }
631
523
  /**
632
- * @param {Array<string>} out_192
633
- * @param {string} name_193
634
- * @returns {void}
524
+ * @param {Array<string>} out_188
525
+ * @param {string} name_189
635
526
  */
636
- pushCaptureName(out_192, name_193) {
637
- let return_194;
638
- return_194 = void 0;
639
- listBuilderAdd_9(out_192, strCat_10("?\u003c", name_193, "\u003e"));
640
- return return_194;
527
+ pushCaptureName(out_188, name_189) {
528
+ let return_190;
529
+ {
530
+ listBuilderAdd_4(out_188, strCat_57("?\u003c", name_189, "\u003e"));
531
+ return_190 = void 0;
532
+ }
533
+ return return_190;
641
534
  }
642
535
  /**
643
- * @param {number} code_196
644
- * @param {boolean} insideCodeSet_197
645
- * @returns {void}
536
+ * @param {number} code_192
537
+ * @param {boolean} insideCodeSet_193
646
538
  */
647
- pushCode(code_196, insideCodeSet_197) {
648
- let return_198;
649
- return_198 = void 0;
650
- regexFormatterPushCodeTo_11(this, this.#out_155, code_196, insideCodeSet_197);
651
- return return_198;
539
+ pushCode(code_192, insideCodeSet_193) {
540
+ regexFormatterPushCodeTo_194(this, this.#out_155, code_192, insideCodeSet_193);
541
+ return;
652
542
  }
653
543
  /**
654
- * @param {CodePoints} codePoints_200
655
- * @param {boolean} insideCodeSet_201
656
- * @returns {void}
544
+ * @param {CodePoints} codePoints_196
545
+ * @param {boolean} insideCodeSet_197
657
546
  */
658
- pushCodePoints(codePoints_200, insideCodeSet_201) {
659
- let return_202;
660
- let t_203;
661
- let t_204;
662
- let t_205;
663
- return_202 = void 0;
664
- let t_206 = codePoints_200.value;
665
- let t_207 = stringCodePoints_12(t_206);
666
- let slice_208 = t_207;
547
+ pushCodePoints(codePoints_196, insideCodeSet_197) {
548
+ let t_198;
549
+ let t_199;
550
+ let t_200 = stringCodePoints_201(codePoints_196.value);
551
+ let slice_202 = t_200;
667
552
  while (true) {
668
- t_203 = slice_208.isEmpty;
669
- if (! t_203) {
670
- t_204 = slice_208.read();
671
- this.pushCode(t_204, insideCodeSet_201);
672
- t_205 = slice_208.advance(1);
673
- slice_208 = t_205;
553
+ if (! slice_202.isEmpty) {
554
+ t_198 = slice_202.read();
555
+ this.pushCode(t_198, insideCodeSet_197);
556
+ t_199 = slice_202.advance(1);
557
+ slice_202 = t_199;
674
558
  } else {
675
559
  break;
676
560
  }
677
561
  }
678
- return return_202;
562
+ return;
679
563
  }
680
- /**
681
- * @param {CodeRange} codeRange_210
682
- * @returns {void}
683
- */
684
- pushCodeRange(codeRange_210) {
685
- let return_211;
686
- return_211 = void 0;
564
+ /** @param {CodeRange} codeRange_204 */
565
+ pushCodeRange(codeRange_204) {
566
+ let return_205;
687
567
  {
688
- listBuilderAdd_9(this.#out_155, "[");
689
- this.pushCodeRangeUnwrapped(codeRange_210);
690
- listBuilderAdd_9(this.#out_155, "]");
568
+ listBuilderAdd_4(this.#out_155, "[");
569
+ this.pushCodeRangeUnwrapped(codeRange_204);
570
+ listBuilderAdd_4(this.#out_155, "]");
571
+ return_205 = void 0;
691
572
  }
692
- return return_211;
573
+ return return_205;
693
574
  }
694
- /**
695
- * @param {CodeRange} codeRange_213
696
- * @returns {void}
697
- */
698
- pushCodeRangeUnwrapped(codeRange_213) {
699
- let return_214;
700
- let t_215;
701
- return_214 = void 0;
702
- let t_216 = codeRange_213.min;
703
- this.pushCode(t_216, true);
575
+ /** @param {CodeRange} codeRange_207 */
576
+ pushCodeRangeUnwrapped(codeRange_207) {
577
+ let return_208;
578
+ let t_209;
579
+ let t_210 = codeRange_207.min;
580
+ this.pushCode(t_210, true);
704
581
  {
705
- listBuilderAdd_9(this.#out_155, "-");
706
- t_215 = codeRange_213.max;
707
- this.pushCode(t_215, true);
582
+ listBuilderAdd_4(this.#out_155, "-");
583
+ t_209 = codeRange_207.max;
584
+ this.pushCode(t_209, true);
585
+ return_208 = void 0;
708
586
  }
709
- return return_214;
587
+ return return_208;
710
588
  }
711
- /**
712
- * @param {CodeSet} codeSet_218
713
- * @returns {void}
714
- */
715
- pushCodeSet(codeSet_218) {
716
- let return_219;
717
- let t_220;
718
- let t_221;
719
- let t_222;
720
- let t_223;
721
- return_219 = void 0;
722
- let t_224;
723
- let t_225;
724
- let t_226;
725
- let t_227 = regexFormatterAdjustCodeSet_13(this, codeSet_218, regexRefs_142);
726
- const adjusted_228 = t_227;
589
+ /** @param {CodeSet} codeSet_212 */
590
+ pushCodeSet(codeSet_212) {
591
+ let t_213;
592
+ let t_214;
593
+ let t_215;
594
+ let t_216;
595
+ const adjusted_217 = regexFormatterAdjustCodeSet_218(this, codeSet_212, regexRefs_147);
727
596
  try {
728
- requireInstanceOf__182(adjusted_228, CodeSet);
729
- t_224 = true;
597
+ requireInstanceOf__178(adjusted_217, CodeSet);
598
+ t_214 = true;
730
599
  } catch {
731
- t_224 = false;
600
+ t_214 = false;
732
601
  }
733
- s__1224_229: {
734
- if (t_224) {
735
- s__1225_230: {
602
+ s__1264_219: {
603
+ if (t_214) {
604
+ s__1265_220: {
736
605
  try {
737
- t_225 = requireInstanceOf__182(adjusted_228, CodeSet);
738
- listBuilderAdd_9(this.#out_155, "[");
606
+ t_215 = requireInstanceOf__178(adjusted_217, CodeSet);
607
+ listBuilderAdd_4(this.#out_155, "[");
739
608
  } catch {
740
- break s__1225_230;
609
+ break s__1265_220;
741
610
  }
742
- t_223 = t_225.negated;
743
- if (t_223) {
611
+ if (t_215.negated) {
744
612
  try {
745
- listBuilderAdd_9(this.#out_155, "^");
613
+ listBuilderAdd_4(this.#out_155, "^");
746
614
  } catch {
747
- break s__1225_230;
615
+ break s__1265_220;
748
616
  }
617
+ } else {
618
+ void 0;
749
619
  }
750
- let i_231 = 0;
620
+ let i_221 = 0;
751
621
  while (true) {
752
- t_220 = t_225.items;
753
- t_222 = t_220.length;
754
- if (ltGeneric_14(i_231, t_222)) {
755
- t_221 = t_225.items;
622
+ t_213 = t_215.items.length;
623
+ if (i_221 < t_213) {
756
624
  try {
757
- t_226 = listGet_15(t_221, i_231);
625
+ t_216 = listGet_53(t_215.items, i_221);
758
626
  } catch {
759
- break s__1225_230;
627
+ break s__1265_220;
760
628
  }
761
- this.pushCodeSetItem(t_226);
762
- i_231 = i_231 + 1;
629
+ this.pushCodeSetItem(t_216);
630
+ i_221 = i_221 + 1;
763
631
  } else {
764
632
  break;
765
633
  }
766
634
  }
767
635
  try {
768
- listBuilderAdd_9(this.#out_155, "]");
769
- break s__1224_229;
636
+ listBuilderAdd_4(this.#out_155, "]");
637
+ break s__1264_219;
770
638
  } catch {
771
639
  }
772
640
  }
773
- throw noResultException__184;
641
+ throw Error();
774
642
  }
775
- this.pushRegex(adjusted_228);
643
+ this.pushRegex(adjusted_217);
776
644
  }
777
- return return_219;
645
+ return;
778
646
  }
779
- /**
780
- * @param {CodePart} codePart_233
781
- * @returns {void}
782
- */
783
- pushCodeSetItem(codePart_233) {
784
- let return_234;
785
- return_234 = void 0;
786
- let t_235;
787
- let t_236;
788
- let t_237;
789
- let t_238;
790
- let t_239;
791
- let t_240;
647
+ /** @param {CodePart} codePart_223 */
648
+ pushCodeSetItem(codePart_223) {
649
+ let return_224;
650
+ let t_225;
651
+ let t_226;
652
+ let t_227;
653
+ let t_228;
654
+ let t_229;
655
+ let t_230;
792
656
  try {
793
- requireInstanceOf__182(codePart_233, CodePoints);
794
- t_235 = true;
657
+ requireInstanceOf__178(codePart_223, CodePoints);
658
+ t_225 = true;
795
659
  } catch {
796
- t_235 = false;
660
+ t_225 = false;
797
661
  }
798
- s__1232_241: {
799
- if (t_235) {
662
+ s__1269_231: {
663
+ if (t_225) {
800
664
  try {
801
- t_236 = requireInstanceOf__182(codePart_233, CodePoints);
665
+ t_226 = requireInstanceOf__178(codePart_223, CodePoints);
802
666
  } catch {
803
- break s__1232_241;
667
+ break s__1269_231;
804
668
  }
805
- this.pushCodePoints(t_236, true);
669
+ this.pushCodePoints(t_226, true);
806
670
  } else {
807
671
  try {
808
- requireInstanceOf__182(codePart_233, CodeRange);
809
- t_237 = true;
672
+ requireInstanceOf__178(codePart_223, CodeRange);
673
+ t_227 = true;
810
674
  } catch {
811
- t_237 = false;
675
+ t_227 = false;
812
676
  }
813
- if (t_237) {
677
+ if (t_227) {
814
678
  try {
815
- t_238 = requireInstanceOf__182(codePart_233, CodeRange);
679
+ t_228 = requireInstanceOf__178(codePart_223, CodeRange);
816
680
  } catch {
817
- break s__1232_241;
681
+ break s__1269_231;
818
682
  }
819
- this.pushCodeRangeUnwrapped(t_238);
683
+ this.pushCodeRangeUnwrapped(t_228);
820
684
  } else {
821
685
  try {
822
- requireInstanceOf__182(codePart_233, SpecialSet);
823
- t_239 = true;
686
+ requireInstanceOf__178(codePart_223, SpecialSet);
687
+ t_229 = true;
824
688
  } catch {
825
- t_239 = false;
689
+ t_229 = false;
826
690
  }
827
- if (t_239) {
691
+ if (t_229) {
828
692
  try {
829
- t_240 = requireInstanceOf__182(codePart_233, SpecialSet);
693
+ t_230 = requireInstanceOf__178(codePart_223, SpecialSet);
830
694
  } catch {
831
- break s__1232_241;
695
+ break s__1269_231;
832
696
  }
833
- this.pushRegex(t_240);
697
+ this.pushRegex(t_230);
698
+ } else {
699
+ void 0;
834
700
  }
835
701
  }
836
702
  }
837
- return return_234;
703
+ return_224 = void 0;
704
+ return return_224;
838
705
  }
839
- throw noResultException__184;
706
+ throw Error();
840
707
  }
841
- /**
842
- * @param {Or} or_243
843
- * @returns {void}
844
- */
845
- pushOr(or_243) {
846
- let return_244;
847
- let t_245;
848
- let t_246;
849
- let t_247;
850
- let t_248;
851
- return_244 = void 0;
852
- let t_249;
853
- let t_250;
854
- let t_251 = or_243.items;
855
- let t_252 = ! t_251.length;
856
- s__1234_253: if (! t_252) {
857
- s__1235_254: {
708
+ /** @param {Or} or_233 */
709
+ pushOr(or_233) {
710
+ let t_234;
711
+ let t_235;
712
+ let t_236;
713
+ s__1271_237: if (! ! or_233.items.length) {
714
+ s__1272_238: {
858
715
  try {
859
- listBuilderAdd_9(this.#out_155, "(?:");
860
- t_248 = or_243.items;
861
- t_249 = listGet_15(t_248, 0);
716
+ listBuilderAdd_4(this.#out_155, "(?:");
717
+ t_235 = listGet_53(or_233.items, 0);
862
718
  } catch {
863
- break s__1235_254;
719
+ break s__1272_238;
864
720
  }
865
- this.pushRegex(t_249);
866
- let i_255 = 1;
721
+ this.pushRegex(t_235);
722
+ let i_239 = 1;
867
723
  while (true) {
868
- t_245 = or_243.items;
869
- t_247 = t_245.length;
870
- if (ltGeneric_14(i_255, t_247)) {
724
+ t_234 = or_233.items.length;
725
+ if (i_239 < t_234) {
871
726
  try {
872
- listBuilderAdd_9(this.#out_155, "|");
873
- t_246 = or_243.items;
874
- t_250 = listGet_15(t_246, i_255);
727
+ listBuilderAdd_4(this.#out_155, "|");
728
+ t_236 = listGet_53(or_233.items, i_239);
875
729
  } catch {
876
730
  break;
877
731
  }
878
- this.pushRegex(t_250);
879
- i_255 = i_255 + 1;
732
+ this.pushRegex(t_236);
733
+ i_239 = i_239 + 1;
880
734
  } else {
881
735
  try {
882
- listBuilderAdd_9(this.#out_155, ")");
736
+ listBuilderAdd_4(this.#out_155, ")");
883
737
  } catch {
884
- break s__1235_254;
738
+ break s__1272_238;
885
739
  }
886
- break s__1234_253;
740
+ break s__1271_237;
887
741
  }
888
742
  }
889
743
  }
890
- throw noResultException__184;
744
+ throw Error();
891
745
  }
892
- return return_244;
746
+ return;
893
747
  }
894
- /**
895
- * @param {Repeat} repeat_257
896
- * @returns {void}
897
- */
898
- pushRepeat(repeat_257) {
899
- let return_258;
900
- let t_259;
901
- let t_260;
902
- let t_261;
903
- let t_262;
904
- let t_263;
905
- return_258 = void 0;
906
- let t_264;
907
- let t_265;
908
- let t_266;
909
- let t_267;
910
- let t_268;
911
- let t_269;
912
- let t_270;
913
- s__1239_271: {
914
- let min_272;
748
+ /** @param {Repeat} repeat_241 */
749
+ pushRepeat(repeat_241) {
750
+ let return_242;
751
+ let t_243;
752
+ let t_244;
753
+ let t_245;
754
+ let t_246;
755
+ let t_247;
756
+ let t_248;
757
+ s__1275_249: {
758
+ let min_250;
759
+ let max_251;
915
760
  try {
916
- listBuilderAdd_9(this.#out_155, "(?:");
917
- t_259 = repeat_257.item;
918
- this.pushRegex(t_259);
919
- listBuilderAdd_9(this.#out_155, ")");
920
- t_260 = repeat_257.min;
921
- min_272 = t_260;
922
- t_264 = repeat_257.max;
761
+ listBuilderAdd_4(this.#out_155, "(?:");
762
+ t_243 = repeat_241.item;
763
+ this.pushRegex(t_243);
764
+ listBuilderAdd_4(this.#out_155, ")");
765
+ min_250 = repeat_241.min;
766
+ max_251 = repeat_241.max;
923
767
  } catch {
924
- break s__1239_271;
768
+ break s__1275_249;
925
769
  }
926
- const max_273 = t_264;
927
- if (eqGeneric_16(min_272, 0)) {
928
- t_265 = eqGeneric_16(max_273, 1);
770
+ if (min_250 === 0) {
771
+ t_244 = max_251 === 1;
929
772
  } else {
930
- t_265 = false;
773
+ t_244 = false;
931
774
  }
932
- if (t_265) {
775
+ if (t_244) {
933
776
  try {
934
- listBuilderAdd_9(this.#out_155, "?");
777
+ listBuilderAdd_4(this.#out_155, "?");
935
778
  } catch {
936
- break s__1239_271;
779
+ break s__1275_249;
937
780
  }
938
781
  } else {
939
- if (eqGeneric_16(min_272, 0)) {
940
- t_266 = eqGeneric_16(max_273, null);
782
+ if (min_250 === 0) {
783
+ t_245 = max_251 === null;
941
784
  } else {
942
- t_266 = false;
785
+ t_245 = false;
943
786
  }
944
- if (t_266) {
787
+ if (t_245) {
945
788
  try {
946
- listBuilderAdd_9(this.#out_155, "*");
789
+ listBuilderAdd_4(this.#out_155, "*");
947
790
  } catch {
948
- break s__1239_271;
791
+ break s__1275_249;
949
792
  }
950
793
  } else {
951
- if (eqGeneric_16(min_272, 1)) {
952
- t_267 = eqGeneric_16(max_273, null);
794
+ if (min_250 === 1) {
795
+ t_246 = max_251 === null;
953
796
  } else {
954
- t_267 = false;
797
+ t_246 = false;
955
798
  }
956
- if (t_267) {
799
+ if (t_246) {
957
800
  try {
958
- listBuilderAdd_9(this.#out_155, "+");
801
+ listBuilderAdd_4(this.#out_155, "+");
959
802
  } catch {
960
- break s__1239_271;
803
+ break s__1275_249;
961
804
  }
962
805
  } else {
963
- t_268 = this.#out_155;
964
- t_261 = intToString_17(min_272);
965
806
  try {
966
- listBuilderAdd_9(t_268, strCat_10("{", t_261));
807
+ listBuilderAdd_4(this.#out_155, strCat_57("{", intToString_252(min_250)));
967
808
  } catch {
968
- break s__1239_271;
809
+ break s__1275_249;
969
810
  }
970
- if (neGeneric_18(min_272, max_273)) {
811
+ if (min_250 !== max_251) {
971
812
  try {
972
- listBuilderAdd_9(this.#out_155, ",");
813
+ listBuilderAdd_4(this.#out_155, ",");
973
814
  } catch {
974
- break s__1239_271;
815
+ break s__1275_249;
975
816
  }
976
- if (neGeneric_18(max_273, null)) {
977
- t_270 = this.#out_155;
817
+ if (max_251 !== null) {
818
+ t_248 = this.#out_155;
978
819
  try {
979
- t_269 = requireIsSafeInteger__274(max_273);
980
- t_262 = intToString_17(t_269);
981
- listBuilderAdd_9(t_270, t_262);
820
+ t_247 = requireIsSafeInteger__253(max_251);
821
+ listBuilderAdd_4(t_248, intToString_252(t_247));
982
822
  } catch {
983
- break s__1239_271;
823
+ break s__1275_249;
984
824
  }
825
+ } else {
826
+ void 0;
985
827
  }
828
+ } else {
829
+ void 0;
986
830
  }
987
831
  try {
988
- listBuilderAdd_9(this.#out_155, "}");
832
+ listBuilderAdd_4(this.#out_155, "}");
989
833
  } catch {
990
- break s__1239_271;
834
+ break s__1275_249;
991
835
  }
992
836
  }
993
837
  }
994
838
  }
995
- t_263 = repeat_257.reluctant;
996
- if (t_263) {
839
+ if (repeat_241.reluctant) {
997
840
  try {
998
- listBuilderAdd_9(this.#out_155, "?");
841
+ listBuilderAdd_4(this.#out_155, "?");
999
842
  } catch {
1000
- break s__1239_271;
843
+ break s__1275_249;
1001
844
  }
845
+ } else {
846
+ void 0;
1002
847
  }
1003
- return return_258;
848
+ return_242 = void 0;
849
+ return return_242;
1004
850
  }
1005
- throw noResultException__184;
851
+ throw Error();
1006
852
  }
1007
- /**
1008
- * @param {Sequence} sequence_276
1009
- * @returns {void}
1010
- */
1011
- pushSequence(sequence_276) {
1012
- let return_277;
1013
- let t_278;
1014
- let t_279;
1015
- let t_280;
1016
- return_277 = void 0;
1017
- let t_281;
1018
- let i_282 = 0;
1019
- s__1244_283: {
853
+ /** @param {Sequence} sequence_255 */
854
+ pushSequence(sequence_255) {
855
+ let return_256;
856
+ let t_257;
857
+ let t_258;
858
+ let i_259 = 0;
859
+ s__1278_260: {
1020
860
  while (true) {
1021
- t_278 = sequence_276.items;
1022
- t_280 = t_278.length;
1023
- if (ltGeneric_14(i_282, t_280)) {
1024
- t_279 = sequence_276.items;
861
+ t_257 = sequence_255.items.length;
862
+ if (i_259 < t_257) {
1025
863
  try {
1026
- t_281 = listGet_15(t_279, i_282);
864
+ t_258 = listGet_53(sequence_255.items, i_259);
1027
865
  } catch {
1028
866
  break;
1029
867
  }
1030
- this.pushRegex(t_281);
1031
- i_282 = i_282 + 1;
868
+ this.pushRegex(t_258);
869
+ i_259 = i_259 + 1;
1032
870
  } else {
1033
- break s__1244_283;
871
+ return_256 = void 0;
872
+ break s__1278_260;
1034
873
  }
1035
874
  }
1036
- throw noResultException__184;
875
+ throw Error();
1037
876
  }
1038
- return return_277;
877
+ return return_256;
1039
878
  }
1040
879
  /**
1041
- * @param {CodePart} codePart_285
1042
- * @returns {"Unsupported type: Int | Null"}
880
+ * @param {CodePart} codePart_262
881
+ * @returns {number | null}
1043
882
  */
1044
- maxCode(codePart_285) {
1045
- let return_286;
1046
- let t_287;
1047
- let t_288;
1048
- let t_289;
1049
- let t_290;
1050
- let t_291;
1051
- let t_292;
1052
- let t_293;
1053
- let t_294;
1054
- let t_295;
1055
- let t_296;
1056
- let t_297;
1057
- let t_298;
1058
- let t_299;
1059
- let t_300;
1060
- let t_301;
1061
- let t_302;
1062
- let t_303;
1063
- let t_304;
1064
- let t_305;
1065
- let t_306;
883
+ maxCode(codePart_262) {
884
+ let return_263;
885
+ let t_264;
886
+ let t_265;
887
+ let t_266;
888
+ let t_267;
889
+ let t_268;
890
+ let t_269;
891
+ let t_270;
892
+ let t_271;
893
+ let t_272;
894
+ let t_273;
1066
895
  try {
1067
- requireInstanceOf__182(codePart_285, CodePoints);
1068
- t_300 = true;
896
+ requireInstanceOf__178(codePart_262, CodePoints);
897
+ t_270 = true;
1069
898
  } catch {
1070
- t_300 = false;
899
+ t_270 = false;
1071
900
  }
1072
- s__1246_307: {
1073
- if (t_300) {
901
+ s__1280_274: {
902
+ if (t_270) {
1074
903
  try {
1075
- t_301 = requireInstanceOf__182(codePart_285, CodePoints);
904
+ t_271 = requireInstanceOf__178(codePart_262, CodePoints);
1076
905
  } catch {
1077
- break s__1246_307;
906
+ break s__1280_274;
1078
907
  }
1079
- t_290 = t_301.value;
1080
- const value_308 = t_290;
1081
- t_291 = ! value_308;
1082
- if (t_291) {
1083
- t_303 = null;
908
+ const value_275 = t_271.value;
909
+ if (! value_275) {
910
+ return_263 = null;
1084
911
  } else {
1085
- let max_309 = 0;
1086
- t_292 = stringCodePoints_12(value_308);
1087
- let slice_310 = t_292;
912
+ let max_276 = 0;
913
+ t_264 = stringCodePoints_201(value_275);
914
+ let slice_277 = t_264;
1088
915
  while (true) {
1089
- t_293 = slice_310.isEmpty;
1090
- if (! t_293) {
1091
- t_294 = slice_310.read();
1092
- const next_311 = t_294;
1093
- if (gtGeneric_19(next_311, max_309)) {
1094
- max_309 = next_311;
916
+ if (! slice_277.isEmpty) {
917
+ const next_278 = slice_277.read();
918
+ if (next_278 > max_276) {
919
+ max_276 = next_278;
920
+ } else {
921
+ void 0;
1095
922
  }
1096
- t_295 = slice_310.advance(1);
1097
- slice_310 = t_295;
923
+ t_265 = slice_277.advance(1);
924
+ slice_277 = t_265;
1098
925
  } else {
1099
926
  break;
1100
927
  }
1101
928
  }
1102
- t_302 = max_309;
1103
- t_303 = t_302;
929
+ return_263 = max_276;
1104
930
  }
1105
- t_306 = t_303;
1106
931
  } else {
1107
932
  try {
1108
- requireInstanceOf__182(codePart_285, CodeRange);
1109
- t_304 = true;
933
+ requireInstanceOf__178(codePart_262, CodeRange);
934
+ t_272 = true;
1110
935
  } catch {
1111
- t_304 = false;
936
+ t_272 = false;
1112
937
  }
1113
- if (t_304) {
938
+ if (t_272) {
939
+ try {
940
+ t_273 = requireInstanceOf__178(codePart_262, CodeRange);
941
+ t_266 = t_273.max;
942
+ return_263 = t_266;
943
+ } catch {
944
+ break s__1280_274;
945
+ }
946
+ } else if (eqGeneric_180(codePart_262, Digit)) {
947
+ t_267 = stringCodePoints_201("9").read();
1114
948
  try {
1115
- t_305 = requireInstanceOf__182(codePart_285, CodeRange);
949
+ return_263 = t_267;
1116
950
  } catch {
1117
- break s__1246_307;
951
+ break s__1280_274;
952
+ }
953
+ } else if (eqGeneric_180(codePart_262, Space)) {
954
+ t_268 = stringCodePoints_201(" ").read();
955
+ try {
956
+ return_263 = t_268;
957
+ } catch {
958
+ break s__1280_274;
959
+ }
960
+ } else if (eqGeneric_180(codePart_262, Word)) {
961
+ t_269 = stringCodePoints_201("z").read();
962
+ try {
963
+ return_263 = t_269;
964
+ } catch {
965
+ break s__1280_274;
1118
966
  }
1119
- t_296 = t_305.max;
1120
- t_306 = t_296;
1121
- } else if (eqGeneric_8(codePart_285, Digit)) {
1122
- t_287 = stringCodePoints_12("9");
1123
- t_297 = t_287.read();
1124
- t_306 = t_297;
1125
- } else if (eqGeneric_8(codePart_285, Space)) {
1126
- t_288 = stringCodePoints_12(" ");
1127
- t_298 = t_288.read();
1128
- t_306 = t_298;
1129
- } else if (eqGeneric_8(codePart_285, Word)) {
1130
- t_289 = stringCodePoints_12("z");
1131
- t_299 = t_289.read();
1132
- t_306 = t_299;
1133
967
  } else {
1134
- t_306 = null;
968
+ return_263 = null;
1135
969
  }
1136
970
  }
1137
- try {
1138
- return_286 = t_306;
1139
- return return_286;
1140
- } catch {
1141
- }
971
+ return return_263;
1142
972
  }
1143
- throw noResultException__184;
973
+ throw Error();
1144
974
  }
1145
- /** @param {Array<string>} out_312 */
1146
- constructor(out_312) {
1147
- let return_313;
1148
- let t_314;
1149
- return_313 = void 0;
1150
- if (!(out_312 !== void 0)) {
1151
- t_314 = [];
1152
- out_312 = t_314;
975
+ /** @param {Array<string>} out_279 */
976
+ constructor(out_279) {
977
+ let t_280;
978
+ if (!(out_279 !== void 0)) {
979
+ t_280 = [];
980
+ out_279 = t_280;
1153
981
  }
1154
- this.#out_155 = out_312;
982
+ this.#out_155 = out_279;
1155
983
  return;
1156
984
  }
1157
985
  }
1158
- class Begin_315 {
1159
- /** */
986
+ class Begin_281 {
1160
987
  constructor() {
1161
- let return_316;
1162
- return_316 = void 0;
1163
988
  return;
1164
989
  }
1165
990
  }
1166
- Special.implementedBy(Begin_315);
1167
- /** @type {Begin_315} */
1168
- let t_317 = new Begin_315();
1169
- /** @type {Begin_315} */
1170
- export const Begin = t_317;
1171
- ;
1172
- class Dot_318 {
1173
- /** */
991
+ Special.implementedBy(Begin_281);
992
+ /** @type {Special} */
993
+ export const Begin = new Begin_281();
994
+ class Dot_282 {
1174
995
  constructor() {
1175
- let return_319;
1176
- return_319 = void 0;
1177
996
  return;
1178
997
  }
1179
998
  }
1180
- Special.implementedBy(Dot_318);
1181
- /** @type {Dot_318} */
1182
- let t_320 = new Dot_318();
1183
- /** @type {Dot_318} */
1184
- export const Dot = t_320;
1185
- ;
1186
- class End_321 {
1187
- /** */
999
+ Special.implementedBy(Dot_282);
1000
+ /** @type {Special} */
1001
+ export const Dot = new Dot_282();
1002
+ class End_283 {
1188
1003
  constructor() {
1189
- let return_322;
1190
- return_322 = void 0;
1191
1004
  return;
1192
1005
  }
1193
1006
  }
1194
- Special.implementedBy(End_321);
1195
- /** @type {End_321} */
1196
- let t_323 = new End_321();
1197
- /** @type {End_321} */
1198
- export const End = t_323;
1199
- ;
1200
- class WordBoundary_324 {
1201
- /** */
1007
+ Special.implementedBy(End_283);
1008
+ /** @type {Special} */
1009
+ export const End = new End_283();
1010
+ class WordBoundary_284 {
1202
1011
  constructor() {
1203
- let return_325;
1204
- return_325 = void 0;
1205
1012
  return;
1206
1013
  }
1207
1014
  }
1208
- Special.implementedBy(WordBoundary_324);
1209
- /** @type {WordBoundary_324} */
1210
- let t_326 = new WordBoundary_324();
1211
- /** @type {WordBoundary_324} */
1212
- export const WordBoundary = t_326;
1213
- ;
1214
- class Digit_327 {
1215
- /** */
1015
+ Special.implementedBy(WordBoundary_284);
1016
+ /** @type {Special} */
1017
+ export const WordBoundary = new WordBoundary_284();
1018
+ class Digit_285 {
1216
1019
  constructor() {
1217
- let return_328;
1218
- return_328 = void 0;
1219
1020
  return;
1220
1021
  }
1221
1022
  }
1222
- SpecialSet.implementedBy(Digit_327);
1223
- /** @type {Digit_327} */
1224
- let t_329 = new Digit_327();
1225
- /** @type {Digit_327} */
1226
- export const Digit = t_329;
1227
- ;
1228
- class Space_330 {
1229
- /** */
1023
+ SpecialSet.implementedBy(Digit_285);
1024
+ /** @type {SpecialSet} */
1025
+ export const Digit = new Digit_285();
1026
+ class Space_286 {
1230
1027
  constructor() {
1231
- let return_331;
1232
- return_331 = void 0;
1233
1028
  return;
1234
1029
  }
1235
1030
  }
1236
- SpecialSet.implementedBy(Space_330);
1237
- /** @type {Space_330} */
1238
- let t_332 = new Space_330();
1239
- /** @type {Space_330} */
1240
- export const Space = t_332;
1241
- ;
1242
- class Word_333 {
1243
- /** */
1031
+ SpecialSet.implementedBy(Space_286);
1032
+ /** @type {SpecialSet} */
1033
+ export const Space = new Space_286();
1034
+ class Word_287 {
1244
1035
  constructor() {
1245
- let return_334;
1246
- return_334 = void 0;
1247
1036
  return;
1248
1037
  }
1249
1038
  }
1250
- SpecialSet.implementedBy(Word_333);
1251
- /** @type {Word_333} */
1252
- let t_335 = new Word_333();
1253
- /** @type {Word_333} */
1254
- export const Word = t_335;
1255
- ;
1039
+ SpecialSet.implementedBy(Word_287);
1040
+ /** @type {SpecialSet} */
1041
+ export const Word = new Word_287();
1256
1042
  /**
1257
- * @param {Regex} item_336
1043
+ * @param {Regex} item_288
1258
1044
  * @returns {Regex}
1259
1045
  */
1260
- export function entire(item_336) {
1261
- let return_337;
1262
- let t_338 = new Sequence(listify_2(Begin, item_336, End));
1263
- return_337 = t_338;
1264
- return return_337;
1046
+ export function entire(item_288) {
1047
+ return new Sequence(listify_42(Begin, item_288, End));
1265
1048
  };
1266
1049
  /**
1267
- * @param {Regex} item_339
1268
- * @param {boolean} reluctant_340
1050
+ * @param {Regex} item_289
1051
+ * @param {boolean} reluctant_290
1269
1052
  * @returns {Repeat}
1270
1053
  */
1271
- export function oneOrMore(item_339, reluctant_340) {
1272
- let return_341;
1273
- if (!(reluctant_340 !== void 0)) {
1274
- reluctant_340 = false;
1054
+ export function oneOrMore(item_289, reluctant_290) {
1055
+ if (!(reluctant_290 !== void 0)) {
1056
+ reluctant_290 = false;
1275
1057
  }
1276
- let t_342 = new Repeat(item_339, 1, null, reluctant_340);
1277
- return_341 = t_342;
1278
- return return_341;
1058
+ return new Repeat(item_289, 1, null, reluctant_290);
1279
1059
  };
1280
1060
  /**
1281
- * @param {Regex} item_343
1282
- * @param {boolean} reluctant_344
1061
+ * @param {Regex} item_291
1062
+ * @param {boolean} reluctant_292
1283
1063
  * @returns {Repeat}
1284
1064
  */
1285
- export function optional(item_343, reluctant_344) {
1286
- let return_345;
1287
- if (!(reluctant_344 !== void 0)) {
1288
- reluctant_344 = false;
1065
+ export function optional(item_291, reluctant_292) {
1066
+ if (!(reluctant_292 !== void 0)) {
1067
+ reluctant_292 = false;
1289
1068
  }
1290
- let t_346 = new Repeat(item_343, 0, 1, reluctant_344);
1291
- return_345 = t_346;
1292
- return return_345;
1069
+ return new Repeat(item_291, 0, 1, reluctant_292);
1293
1070
  };
1294
- /** @type {RegexRefs_111} */
1295
- let t_347 = new RegexRefs_111();
1296
- /** @type {RegexRefs_111} */
1297
- const regexRefs_142 = t_347;
1298
- /** @type {Type_349} */
1299
- const return_348 = "RegexFormatter__29: Type";
1300
- export default return_348;
1071
+ /** @type {RegexRefs_122} */
1072
+ const regexRefs_147 = new RegexRefs_122();