@temperlang/std 0.0.4 → 0.0.6

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_94, compiledRegexCompileFormatted as compiledRegexCompileFormatted_95, compiledRegexCompiledFound as compiledRegexCompiledFound_96, compiledRegexCompiledFind as compiledRegexCompiledFind_97, compiledRegexCompiledReplace as compiledRegexCompiledReplace_98, eqGeneric as eqGeneric_99, regexFormatterPushCodeTo as regexFormatterPushCodeTo_100, regexFormatterAdjustCodeSet as regexFormatterAdjustCodeSet_101, gtGeneric as gtGeneric_102, listify as listify_3, listJoin as listJoin_2, listBuilderAdd as listBuilderAdd_0, strCat as strCat_9, stringCodePoints as stringCodePoints_74, ltGeneric as ltGeneric_6, listGet as listGet_7, eqGeneric as eqGeneric_70, intToString as intToString_73, neGeneric as neGeneric_72, requireInstanceOf as requireInstanceOf__211, bubbleException as bubbleException__213, requireIsSafeInteger as requireIsSafeInteger__282
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 methodCompiled103() {
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 methodFound104(text_105) {
8
+ return this.compiled().found(text_105);
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 methodFind106(text_107) {
11
+ return this.compiled().find(text_107);
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 methodReplace108(text_109, format_110) {
14
+ return this.compiled().replace(text_109, format_110);
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_105: string) => boolean, find: (text_107: string) => Map<string, Group>, replace: (text_109: string, format_110: (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_94("Regex", [["m", "compiled", methodCompiled103], ["m", "found", methodFound104], ["m", "find", methodFind106], ["m", "replace", methodReplace108]], [], 1);
42
23
  export class Capture {
43
24
  /** @type {string} */
44
- #name_39;
25
+ #name_111;
45
26
  /** @type {Regex} */
46
- #item_40;
27
+ #item_112;
47
28
  /**
48
- * @param {string} name_41
49
- * @param {Regex} item_42
29
+ * @param {string} name_113
30
+ * @param {Regex} item_114
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_113, item_114) {
33
+ this.#name_111 = name_113;
34
+ this.#item_112 = item_114;
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_111;
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_112;
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_94("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_117;
55
+ /** @param {string} value_118 */
56
+ constructor(value_118) {
57
+ this.#value_117 = value_118;
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_117;
93
63
  }
94
64
  };
95
65
  CodePart.implementedBy(CodePoints);
@@ -97,505 +67,429 @@ 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_94("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_94("SpecialSet", [], [CodePart, Special], 3);
108
76
  export class CodeRange {
109
77
  /** @type {number} */
110
- #min_53;
78
+ #min_120;
111
79
  /** @type {number} */
112
- #max_54;
80
+ #max_121;
113
81
  /**
114
- * @param {number} min_55
115
- * @param {number} max_56
82
+ * @param {number} min_122
83
+ * @param {number} max_123
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_122, max_123) {
86
+ this.#min_120 = min_122;
87
+ this.#max_121 = max_123;
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_120;
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_121;
135
97
  }
136
98
  };
137
99
  CodePart.implementedBy(CodeRange);
138
100
  export class CodeSet {
139
101
  /** @type {Array<CodePart>} */
140
- #items_62;
102
+ #items_126;
141
103
  /** @type {boolean} */
142
- #negated_63;
104
+ #negated_127;
143
105
  /**
144
- * @param {Array<CodePart>} items_64
145
- * @param {boolean} negated_65
106
+ * @param {Array<CodePart>} items_128
107
+ * @param {boolean} negated_129
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_128, negated_129) {
110
+ if (!(negated_129 !== void 0)) {
111
+ negated_129 = false;
152
112
  }
153
- this.#items_62 = items_64;
154
- this.#negated_63 = negated_65;
113
+ this.#items_126 = items_128;
114
+ this.#negated_127 = negated_129;
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_126;
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_127;
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_132;
130
+ /** @param {Array<Regex>} items_133 */
131
+ constructor(items_133) {
132
+ this.#items_132 = items_133;
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_132;
186
138
  }
187
139
  };
188
140
  Regex.implementedBy(Or);
189
141
  export class Repeat {
190
142
  /** @type {Regex} */
191
- #item_76;
143
+ #item_135;
192
144
  /** @type {number} */
193
- #min_77;
194
- /** @type {"Unsupported type: Int | Null"} */
195
- #max_78;
145
+ #min_136;
146
+ /** @type {number | null} */
147
+ #max_137;
196
148
  /** @type {boolean} */
197
- #reluctant_79;
149
+ #reluctant_138;
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_139
152
+ * @param {number} min_140
153
+ * @param {number | null} max_141
154
+ * @param {boolean} reluctant_142
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_139, min_140, max_141, reluctant_142) {
157
+ if (!(reluctant_142 !== void 0)) {
158
+ reluctant_142 = 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_135 = item_139;
161
+ this.#min_136 = min_140;
162
+ this.#max_137 = max_141;
163
+ this.#reluctant_138 = reluctant_142;
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_135;
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_136;
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_137;
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_138;
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_147;
187
+ /** @param {Array<Regex>} items_148 */
188
+ constructor(items_148) {
189
+ this.#items_147 = items_148;
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_147;
257
195
  }
258
196
  };
259
197
  Regex.implementedBy(Sequence);
260
198
  export class Group {
261
199
  /** @type {string} */
262
- #name_98;
200
+ #name_150;
263
201
  /** @type {string} */
264
- #value_99;
202
+ #value_151;
265
203
  /** @type {number} */
266
- #codePointsBegin_100;
204
+ #codePointsBegin_152;
267
205
  /**
268
- * @param {string} name_101
269
- * @param {string} value_102
270
- * @param {number} codePointsBegin_103
206
+ * @param {string} name_153
207
+ * @param {string} value_154
208
+ * @param {number} codePointsBegin_155
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_153, value_154, codePointsBegin_155) {
211
+ this.#name_150 = name_153;
212
+ this.#value_151 = value_154;
213
+ this.#codePointsBegin_152 = codePointsBegin_155;
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_150;
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_151;
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_152;
297
227
  }
298
228
  };
299
- class RegexRefs_111 {
229
+ class RegexRefs_159 {
300
230
  /** @type {CodePoints} */
301
- #codePoints_112;
231
+ #codePoints_160;
302
232
  /** @type {Group} */
303
- #group_113;
233
+ #group_161;
304
234
  /** @type {Or} */
305
- #orObject_114;
235
+ #orObject_162;
306
236
  /**
307
- * @param {CodePoints} codePoints_115
308
- * @param {Group} group_116
309
- * @param {Or} orObject_117
237
+ * @param {CodePoints} codePoints_163
238
+ * @param {Group} group_164
239
+ * @param {Or} orObject_165
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_163, group_164, orObject_165) {
242
+ let t_166;
243
+ let t_167;
244
+ let t_168;
245
+ if (!(codePoints_163 !== void 0)) {
246
+ t_166 = new CodePoints("");
247
+ codePoints_163 = t_166;
320
248
  }
321
- if (!(group_116 !== void 0)) {
322
- t_120 = new Group("", "", 0);
323
- group_116 = t_120;
249
+ if (!(group_164 !== void 0)) {
250
+ t_167 = new Group("", "", 0);
251
+ group_164 = t_167;
324
252
  }
325
- if (!(orObject_117 !== void 0)) {
326
- t_121 = new Or(listify_2());
327
- orObject_117 = t_121;
253
+ if (!(orObject_165 !== void 0)) {
254
+ t_168 = new Or(listify_3());
255
+ orObject_165 = t_168;
328
256
  }
329
- this.#codePoints_112 = codePoints_115;
330
- this.#group_113 = group_116;
331
- this.#orObject_114 = orObject_117;
257
+ this.#codePoints_160 = codePoints_163;
258
+ this.#group_161 = group_164;
259
+ this.#orObject_162 = orObject_165;
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_160;
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_161;
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_162;
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_172;
278
+ /** @param {Regex} data_173 */
279
+ constructor(data_173) {
280
+ this.#data_172 = data_173;
281
+ let t_174 = this.format();
282
+ let t_175 = compiledRegexCompileFormatted_95(this, t_174);
283
+ this.#compiled_176 = t_175;
364
284
  return;
365
285
  }
366
286
  /**
367
- * @param {string} text_135
287
+ * @param {string} text_178
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_178) {
291
+ return compiledRegexCompiledFound_96(this, this.#compiled_176, text_178);
375
292
  }
376
293
  /**
377
- * @param {string} text_139
378
- * @returns {"Unsupported type: Map\u003cString, Group\u003e | NoResult"}
294
+ * @param {string} text_180
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_180) {
298
+ return compiledRegexCompiledFind_97(this, this.#compiled_176, text_180, regexRefs_181);
388
299
  }
389
300
  /**
390
- * @param {string} text_144
391
- * @param {(arg0: Map<string, Group>) => string} format_145
301
+ * @param {string} text_183
302
+ * @param {(arg0: Map<string, Group>) => string} format_184
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_183, format_184) {
306
+ return compiledRegexCompiledReplace_98(this, this.#compiled_176, text_183, format_184, regexRefs_181);
399
307
  }
400
308
  /** @type {unknown} */
401
- #compiled_133;
309
+ #compiled_176;
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_186().format(this.#data_172);
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_172;
415
317
  }
416
318
  };
417
- class RegexFormatter_151 {
319
+ class RegexFormatter_186 {
418
320
  /** @type {Array<string>} */
419
- #out_155;
321
+ #out_188;
420
322
  /**
421
- * @param {Regex} regex_157
323
+ * @param {Regex} regex_190
422
324
  * @returns {string}
423
325
  */
424
- format(regex_157) {
425
- let return_158;
426
- 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;
326
+ format(regex_190) {
327
+ this.pushRegex(regex_190);
328
+ let t_191 = this.#out_188;
329
+ function fn_192(x_193) {
330
+ return x_193;
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_2(t_191, "", fn_192);
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;
445
- let t_168;
446
- let t_169;
447
- let t_170;
448
- let t_171;
449
- let t_172;
450
- let t_173;
451
- let t_174;
452
- let t_175;
453
- let t_176;
454
- let t_177;
455
- let t_178;
456
- let t_179;
457
- let t_180;
458
- let t_181;
334
+ /** @param {Regex} regex_195 */
335
+ pushRegex(regex_195) {
336
+ let return_196;
337
+ let t_197;
338
+ let t_198;
339
+ let t_199;
340
+ let t_200;
341
+ let t_201;
342
+ let t_202;
343
+ let t_203;
344
+ let t_204;
345
+ let t_205;
346
+ let t_206;
347
+ let t_207;
348
+ let t_208;
349
+ let t_209;
350
+ let t_210;
459
351
  try {
460
- requireInstanceOf__182(regex_166, Capture);
461
- t_168 = true;
352
+ requireInstanceOf__211(regex_195, Capture);
353
+ t_197 = true;
462
354
  } catch {
463
- t_168 = false;
355
+ t_197 = false;
464
356
  }
465
- s__1217_183: {
466
- if (t_168) {
357
+ s__1238_212: {
358
+ if (t_197) {
467
359
  try {
468
- t_169 = requireInstanceOf__182(regex_166, Capture);
360
+ t_198 = requireInstanceOf__211(regex_195, Capture);
469
361
  } catch {
470
- break s__1217_183;
362
+ break s__1238_212;
471
363
  }
472
- this.pushCapture(t_169);
364
+ this.pushCapture(t_198);
473
365
  } else {
474
366
  try {
475
- requireInstanceOf__182(regex_166, CodePoints);
476
- t_170 = true;
367
+ requireInstanceOf__211(regex_195, CodePoints);
368
+ t_199 = true;
477
369
  } catch {
478
- t_170 = false;
370
+ t_199 = false;
479
371
  }
480
- if (t_170) {
372
+ if (t_199) {
481
373
  try {
482
- t_171 = requireInstanceOf__182(regex_166, CodePoints);
374
+ t_200 = requireInstanceOf__211(regex_195, CodePoints);
483
375
  } catch {
484
- break s__1217_183;
376
+ break s__1238_212;
485
377
  }
486
- this.pushCodePoints(t_171, false);
378
+ this.pushCodePoints(t_200, false);
487
379
  } else {
488
380
  try {
489
- requireInstanceOf__182(regex_166, CodeRange);
490
- t_172 = true;
381
+ requireInstanceOf__211(regex_195, CodeRange);
382
+ t_201 = true;
491
383
  } catch {
492
- t_172 = false;
384
+ t_201 = false;
493
385
  }
494
- if (t_172) {
386
+ if (t_201) {
495
387
  try {
496
- t_173 = requireInstanceOf__182(regex_166, CodeRange);
388
+ t_202 = requireInstanceOf__211(regex_195, CodeRange);
497
389
  } catch {
498
- break s__1217_183;
390
+ break s__1238_212;
499
391
  }
500
- this.pushCodeRange(t_173);
392
+ this.pushCodeRange(t_202);
501
393
  } else {
502
394
  try {
503
- requireInstanceOf__182(regex_166, CodeSet);
504
- t_174 = true;
395
+ requireInstanceOf__211(regex_195, CodeSet);
396
+ t_203 = true;
505
397
  } catch {
506
- t_174 = false;
398
+ t_203 = false;
507
399
  }
508
- if (t_174) {
400
+ if (t_203) {
509
401
  try {
510
- t_175 = requireInstanceOf__182(regex_166, CodeSet);
402
+ t_204 = requireInstanceOf__211(regex_195, CodeSet);
511
403
  } catch {
512
- break s__1217_183;
404
+ break s__1238_212;
513
405
  }
514
- this.pushCodeSet(t_175);
406
+ this.pushCodeSet(t_204);
515
407
  } else {
516
408
  try {
517
- requireInstanceOf__182(regex_166, Or);
518
- t_176 = true;
409
+ requireInstanceOf__211(regex_195, Or);
410
+ t_205 = true;
519
411
  } catch {
520
- t_176 = false;
412
+ t_205 = false;
521
413
  }
522
- if (t_176) {
414
+ if (t_205) {
523
415
  try {
524
- t_177 = requireInstanceOf__182(regex_166, Or);
416
+ t_206 = requireInstanceOf__211(regex_195, Or);
525
417
  } catch {
526
- break s__1217_183;
418
+ break s__1238_212;
527
419
  }
528
- this.pushOr(t_177);
420
+ this.pushOr(t_206);
529
421
  } else {
530
422
  try {
531
- requireInstanceOf__182(regex_166, Repeat);
532
- t_178 = true;
423
+ requireInstanceOf__211(regex_195, Repeat);
424
+ t_207 = true;
533
425
  } catch {
534
- t_178 = false;
426
+ t_207 = false;
535
427
  }
536
- if (t_178) {
428
+ if (t_207) {
537
429
  try {
538
- t_179 = requireInstanceOf__182(regex_166, Repeat);
430
+ t_208 = requireInstanceOf__211(regex_195, Repeat);
539
431
  } catch {
540
- break s__1217_183;
432
+ break s__1238_212;
541
433
  }
542
- this.pushRepeat(t_179);
434
+ this.pushRepeat(t_208);
543
435
  } else {
544
436
  try {
545
- requireInstanceOf__182(regex_166, Sequence);
546
- t_180 = true;
437
+ requireInstanceOf__211(regex_195, Sequence);
438
+ t_209 = true;
547
439
  } catch {
548
- t_180 = false;
440
+ t_209 = false;
549
441
  }
550
- if (t_180) {
442
+ if (t_209) {
551
443
  try {
552
- t_181 = requireInstanceOf__182(regex_166, Sequence);
444
+ t_210 = requireInstanceOf__211(regex_195, Sequence);
553
445
  } catch {
554
- break s__1217_183;
446
+ break s__1238_212;
555
447
  }
556
- this.pushSequence(t_181);
557
- } else if (eqGeneric_8(regex_166, Begin)) {
448
+ this.pushSequence(t_210);
449
+ } else if (eqGeneric_99(regex_195, Begin)) {
558
450
  try {
559
- listBuilderAdd_9(this.#out_155, "^");
451
+ listBuilderAdd_0(this.#out_188, "^");
560
452
  } catch {
561
- break s__1217_183;
453
+ break s__1238_212;
562
454
  }
563
- } else if (eqGeneric_8(regex_166, Dot)) {
455
+ } else if (eqGeneric_99(regex_195, Dot)) {
564
456
  try {
565
- listBuilderAdd_9(this.#out_155, ".");
457
+ listBuilderAdd_0(this.#out_188, ".");
566
458
  } catch {
567
- break s__1217_183;
459
+ break s__1238_212;
568
460
  }
569
- } else if (eqGeneric_8(regex_166, End)) {
461
+ } else if (eqGeneric_99(regex_195, End)) {
570
462
  try {
571
- listBuilderAdd_9(this.#out_155, "\u0024");
463
+ listBuilderAdd_0(this.#out_188, "\u0024");
572
464
  } catch {
573
- break s__1217_183;
465
+ break s__1238_212;
574
466
  }
575
- } else if (eqGeneric_8(regex_166, WordBoundary)) {
467
+ } else if (eqGeneric_99(regex_195, WordBoundary)) {
576
468
  try {
577
- listBuilderAdd_9(this.#out_155, "\\b");
469
+ listBuilderAdd_0(this.#out_188, "\\b");
578
470
  } catch {
579
- break s__1217_183;
471
+ break s__1238_212;
580
472
  }
581
- } else if (eqGeneric_8(regex_166, Digit)) {
473
+ } else if (eqGeneric_99(regex_195, Digit)) {
582
474
  try {
583
- listBuilderAdd_9(this.#out_155, "\\d");
475
+ listBuilderAdd_0(this.#out_188, "\\d");
584
476
  } catch {
585
- break s__1217_183;
477
+ break s__1238_212;
586
478
  }
587
- } else if (eqGeneric_8(regex_166, Space)) {
479
+ } else if (eqGeneric_99(regex_195, Space)) {
588
480
  try {
589
- listBuilderAdd_9(this.#out_155, "\\s");
481
+ listBuilderAdd_0(this.#out_188, "\\s");
590
482
  } catch {
591
- break s__1217_183;
483
+ break s__1238_212;
592
484
  }
593
- } else if (eqGeneric_8(regex_166, Word)) {
485
+ } else if (eqGeneric_99(regex_195, Word)) {
594
486
  try {
595
- listBuilderAdd_9(this.#out_155, "\\w");
487
+ listBuilderAdd_0(this.#out_188, "\\w");
596
488
  } catch {
597
- break s__1217_183;
489
+ break s__1238_212;
598
490
  }
491
+ } else {
492
+ void 0;
599
493
  }
600
494
  }
601
495
  }
@@ -603,452 +497,391 @@ class RegexFormatter_151 {
603
497
  }
604
498
  }
605
499
  }
606
- return return_167;
500
+ return_196 = void 0;
501
+ return return_196;
607
502
  }
608
- throw noResultException__184;
503
+ throw bubbleException__213;
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_215 */
506
+ pushCapture(capture_215) {
507
+ let return_216;
508
+ let t_217;
509
+ let t_218;
510
+ let t_219;
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_0(this.#out_188, "(");
513
+ t_219 = this.#out_188;
514
+ t_217 = capture_215.name;
515
+ this.pushCaptureName(t_219, t_217);
516
+ t_218 = capture_215.item;
517
+ this.pushRegex(t_218);
518
+ listBuilderAdd_0(this.#out_188, ")");
519
+ return_216 = void 0;
628
520
  }
629
- return return_187;
521
+ return return_216;
630
522
  }
631
523
  /**
632
- * @param {Array<string>} out_192
633
- * @param {string} name_193
634
- * @returns {void}
524
+ * @param {Array<string>} out_221
525
+ * @param {string} name_222
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_221, name_222) {
528
+ let return_223;
529
+ {
530
+ listBuilderAdd_0(out_221, strCat_9("?\u003c", name_222, "\u003e"));
531
+ return_223 = void 0;
532
+ }
533
+ return return_223;
641
534
  }
642
535
  /**
643
- * @param {number} code_196
644
- * @param {boolean} insideCodeSet_197
645
- * @returns {void}
536
+ * @param {number} code_225
537
+ * @param {boolean} insideCodeSet_226
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_225, insideCodeSet_226) {
540
+ regexFormatterPushCodeTo_100(this, this.#out_188, code_225, insideCodeSet_226);
541
+ return;
652
542
  }
653
543
  /**
654
- * @param {CodePoints} codePoints_200
655
- * @param {boolean} insideCodeSet_201
656
- * @returns {void}
544
+ * @param {CodePoints} codePoints_228
545
+ * @param {boolean} insideCodeSet_229
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_228, insideCodeSet_229) {
548
+ let t_230;
549
+ let t_231;
550
+ let t_232 = stringCodePoints_74(codePoints_228.value);
551
+ let slice_233 = t_232;
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_233.isEmpty) {
554
+ t_230 = slice_233.read();
555
+ this.pushCode(t_230, insideCodeSet_229);
556
+ t_231 = slice_233.advance(1);
557
+ slice_233 = t_231;
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_235 */
565
+ pushCodeRange(codeRange_235) {
566
+ let return_236;
687
567
  {
688
- listBuilderAdd_9(this.#out_155, "[");
689
- this.pushCodeRangeUnwrapped(codeRange_210);
690
- listBuilderAdd_9(this.#out_155, "]");
568
+ listBuilderAdd_0(this.#out_188, "[");
569
+ this.pushCodeRangeUnwrapped(codeRange_235);
570
+ listBuilderAdd_0(this.#out_188, "]");
571
+ return_236 = void 0;
691
572
  }
692
- return return_211;
573
+ return return_236;
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_238 */
576
+ pushCodeRangeUnwrapped(codeRange_238) {
577
+ let return_239;
578
+ let t_240;
579
+ let t_241 = codeRange_238.min;
580
+ this.pushCode(t_241, true);
704
581
  {
705
- listBuilderAdd_9(this.#out_155, "-");
706
- t_215 = codeRange_213.max;
707
- this.pushCode(t_215, true);
582
+ listBuilderAdd_0(this.#out_188, "-");
583
+ t_240 = codeRange_238.max;
584
+ this.pushCode(t_240, true);
585
+ return_239 = void 0;
708
586
  }
709
- return return_214;
587
+ return return_239;
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_243 */
590
+ pushCodeSet(codeSet_243) {
591
+ let t_244;
592
+ let t_245;
593
+ let t_246;
594
+ let t_247;
595
+ const adjusted_248 = regexFormatterAdjustCodeSet_101(this, codeSet_243, regexRefs_181);
727
596
  try {
728
- requireInstanceOf__182(adjusted_228, CodeSet);
729
- t_224 = true;
597
+ requireInstanceOf__211(adjusted_248, CodeSet);
598
+ t_245 = true;
730
599
  } catch {
731
- t_224 = false;
600
+ t_245 = false;
732
601
  }
733
- s__1224_229: {
734
- if (t_224) {
735
- s__1225_230: {
602
+ s__1242_249: {
603
+ if (t_245) {
604
+ s__1243_250: {
736
605
  try {
737
- t_225 = requireInstanceOf__182(adjusted_228, CodeSet);
738
- listBuilderAdd_9(this.#out_155, "[");
606
+ t_246 = requireInstanceOf__211(adjusted_248, CodeSet);
607
+ listBuilderAdd_0(this.#out_188, "[");
739
608
  } catch {
740
- break s__1225_230;
609
+ break s__1243_250;
741
610
  }
742
- t_223 = t_225.negated;
743
- if (t_223) {
611
+ if (t_246.negated) {
744
612
  try {
745
- listBuilderAdd_9(this.#out_155, "^");
613
+ listBuilderAdd_0(this.#out_188, "^");
746
614
  } catch {
747
- break s__1225_230;
615
+ break s__1243_250;
748
616
  }
617
+ } else {
618
+ void 0;
749
619
  }
750
- let i_231 = 0;
620
+ let i_251 = 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_244 = t_246.items.length;
623
+ if (ltGeneric_6(i_251, t_244)) {
756
624
  try {
757
- t_226 = listGet_15(t_221, i_231);
625
+ t_247 = listGet_7(t_246.items, i_251);
758
626
  } catch {
759
- break s__1225_230;
627
+ break s__1243_250;
760
628
  }
761
- this.pushCodeSetItem(t_226);
762
- i_231 = i_231 + 1;
629
+ this.pushCodeSetItem(t_247);
630
+ i_251 = i_251 + 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_0(this.#out_188, "]");
637
+ break s__1242_249;
770
638
  } catch {
771
639
  }
772
640
  }
773
- throw noResultException__184;
641
+ throw bubbleException__213;
774
642
  }
775
- this.pushRegex(adjusted_228);
643
+ this.pushRegex(adjusted_248);
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_253 */
648
+ pushCodeSetItem(codePart_253) {
649
+ let return_254;
650
+ let t_255;
651
+ let t_256;
652
+ let t_257;
653
+ let t_258;
654
+ let t_259;
655
+ let t_260;
792
656
  try {
793
- requireInstanceOf__182(codePart_233, CodePoints);
794
- t_235 = true;
657
+ requireInstanceOf__211(codePart_253, CodePoints);
658
+ t_255 = true;
795
659
  } catch {
796
- t_235 = false;
660
+ t_255 = false;
797
661
  }
798
- s__1232_241: {
799
- if (t_235) {
662
+ s__1247_261: {
663
+ if (t_255) {
800
664
  try {
801
- t_236 = requireInstanceOf__182(codePart_233, CodePoints);
665
+ t_256 = requireInstanceOf__211(codePart_253, CodePoints);
802
666
  } catch {
803
- break s__1232_241;
667
+ break s__1247_261;
804
668
  }
805
- this.pushCodePoints(t_236, true);
669
+ this.pushCodePoints(t_256, true);
806
670
  } else {
807
671
  try {
808
- requireInstanceOf__182(codePart_233, CodeRange);
809
- t_237 = true;
672
+ requireInstanceOf__211(codePart_253, CodeRange);
673
+ t_257 = true;
810
674
  } catch {
811
- t_237 = false;
675
+ t_257 = false;
812
676
  }
813
- if (t_237) {
677
+ if (t_257) {
814
678
  try {
815
- t_238 = requireInstanceOf__182(codePart_233, CodeRange);
679
+ t_258 = requireInstanceOf__211(codePart_253, CodeRange);
816
680
  } catch {
817
- break s__1232_241;
681
+ break s__1247_261;
818
682
  }
819
- this.pushCodeRangeUnwrapped(t_238);
683
+ this.pushCodeRangeUnwrapped(t_258);
820
684
  } else {
821
685
  try {
822
- requireInstanceOf__182(codePart_233, SpecialSet);
823
- t_239 = true;
686
+ requireInstanceOf__211(codePart_253, SpecialSet);
687
+ t_259 = true;
824
688
  } catch {
825
- t_239 = false;
689
+ t_259 = false;
826
690
  }
827
- if (t_239) {
691
+ if (t_259) {
828
692
  try {
829
- t_240 = requireInstanceOf__182(codePart_233, SpecialSet);
693
+ t_260 = requireInstanceOf__211(codePart_253, SpecialSet);
830
694
  } catch {
831
- break s__1232_241;
695
+ break s__1247_261;
832
696
  }
833
- this.pushRegex(t_240);
697
+ this.pushRegex(t_260);
698
+ } else {
699
+ void 0;
834
700
  }
835
701
  }
836
702
  }
837
- return return_234;
703
+ return_254 = void 0;
704
+ return return_254;
838
705
  }
839
- throw noResultException__184;
706
+ throw bubbleException__213;
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_263 */
709
+ pushOr(or_263) {
710
+ let t_264;
711
+ let t_265;
712
+ let t_266;
713
+ s__1249_267: if (! ! or_263.items.length) {
714
+ s__1250_268: {
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_0(this.#out_188, "(?:");
717
+ t_265 = listGet_7(or_263.items, 0);
862
718
  } catch {
863
- break s__1235_254;
719
+ break s__1250_268;
864
720
  }
865
- this.pushRegex(t_249);
866
- let i_255 = 1;
721
+ this.pushRegex(t_265);
722
+ let i_269 = 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_264 = or_263.items.length;
725
+ if (ltGeneric_6(i_269, t_264)) {
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_0(this.#out_188, "|");
728
+ t_266 = listGet_7(or_263.items, i_269);
875
729
  } catch {
876
730
  break;
877
731
  }
878
- this.pushRegex(t_250);
879
- i_255 = i_255 + 1;
732
+ this.pushRegex(t_266);
733
+ i_269 = i_269 + 1;
880
734
  } else {
881
735
  try {
882
- listBuilderAdd_9(this.#out_155, ")");
736
+ listBuilderAdd_0(this.#out_188, ")");
883
737
  } catch {
884
- break s__1235_254;
738
+ break s__1250_268;
885
739
  }
886
- break s__1234_253;
740
+ break s__1249_267;
887
741
  }
888
742
  }
889
743
  }
890
- throw noResultException__184;
744
+ throw bubbleException__213;
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_271 */
749
+ pushRepeat(repeat_271) {
750
+ let return_272;
751
+ let t_273;
752
+ let t_274;
753
+ let t_275;
754
+ let t_276;
755
+ let t_277;
756
+ let t_278;
757
+ s__1253_279: {
758
+ let min_280;
759
+ let max_281;
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_0(this.#out_188, "(?:");
762
+ t_273 = repeat_271.item;
763
+ this.pushRegex(t_273);
764
+ listBuilderAdd_0(this.#out_188, ")");
765
+ min_280 = repeat_271.min;
766
+ max_281 = repeat_271.max;
923
767
  } catch {
924
- break s__1239_271;
768
+ break s__1253_279;
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 (eqGeneric_70(min_280, 0)) {
771
+ t_274 = eqGeneric_70(max_281, 1);
929
772
  } else {
930
- t_265 = false;
773
+ t_274 = false;
931
774
  }
932
- if (t_265) {
775
+ if (t_274) {
933
776
  try {
934
- listBuilderAdd_9(this.#out_155, "?");
777
+ listBuilderAdd_0(this.#out_188, "?");
935
778
  } catch {
936
- break s__1239_271;
779
+ break s__1253_279;
937
780
  }
938
781
  } else {
939
- if (eqGeneric_16(min_272, 0)) {
940
- t_266 = eqGeneric_16(max_273, null);
782
+ if (eqGeneric_70(min_280, 0)) {
783
+ t_275 = eqGeneric_70(max_281, null);
941
784
  } else {
942
- t_266 = false;
785
+ t_275 = false;
943
786
  }
944
- if (t_266) {
787
+ if (t_275) {
945
788
  try {
946
- listBuilderAdd_9(this.#out_155, "*");
789
+ listBuilderAdd_0(this.#out_188, "*");
947
790
  } catch {
948
- break s__1239_271;
791
+ break s__1253_279;
949
792
  }
950
793
  } else {
951
- if (eqGeneric_16(min_272, 1)) {
952
- t_267 = eqGeneric_16(max_273, null);
794
+ if (eqGeneric_70(min_280, 1)) {
795
+ t_276 = eqGeneric_70(max_281, null);
953
796
  } else {
954
- t_267 = false;
797
+ t_276 = false;
955
798
  }
956
- if (t_267) {
799
+ if (t_276) {
957
800
  try {
958
- listBuilderAdd_9(this.#out_155, "+");
801
+ listBuilderAdd_0(this.#out_188, "+");
959
802
  } catch {
960
- break s__1239_271;
803
+ break s__1253_279;
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_0(this.#out_188, strCat_9("{", intToString_73(min_280)));
967
808
  } catch {
968
- break s__1239_271;
809
+ break s__1253_279;
969
810
  }
970
- if (neGeneric_18(min_272, max_273)) {
811
+ if (neGeneric_72(min_280, max_281)) {
971
812
  try {
972
- listBuilderAdd_9(this.#out_155, ",");
813
+ listBuilderAdd_0(this.#out_188, ",");
973
814
  } catch {
974
- break s__1239_271;
815
+ break s__1253_279;
975
816
  }
976
- if (neGeneric_18(max_273, null)) {
977
- t_270 = this.#out_155;
817
+ if (neGeneric_72(max_281, null)) {
818
+ t_278 = this.#out_188;
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_277 = requireIsSafeInteger__282(max_281);
821
+ listBuilderAdd_0(t_278, intToString_73(t_277));
982
822
  } catch {
983
- break s__1239_271;
823
+ break s__1253_279;
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_0(this.#out_188, "}");
989
833
  } catch {
990
- break s__1239_271;
834
+ break s__1253_279;
991
835
  }
992
836
  }
993
837
  }
994
838
  }
995
- t_263 = repeat_257.reluctant;
996
- if (t_263) {
839
+ if (repeat_271.reluctant) {
997
840
  try {
998
- listBuilderAdd_9(this.#out_155, "?");
841
+ listBuilderAdd_0(this.#out_188, "?");
999
842
  } catch {
1000
- break s__1239_271;
843
+ break s__1253_279;
1001
844
  }
845
+ } else {
846
+ void 0;
1002
847
  }
1003
- return return_258;
848
+ return_272 = void 0;
849
+ return return_272;
1004
850
  }
1005
- throw noResultException__184;
851
+ throw bubbleException__213;
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_284 */
854
+ pushSequence(sequence_284) {
855
+ let return_285;
856
+ let t_286;
857
+ let t_287;
858
+ let i_288 = 0;
859
+ s__1255_289: {
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_286 = sequence_284.items.length;
862
+ if (ltGeneric_6(i_288, t_286)) {
1025
863
  try {
1026
- t_281 = listGet_15(t_279, i_282);
864
+ t_287 = listGet_7(sequence_284.items, i_288);
1027
865
  } catch {
1028
866
  break;
1029
867
  }
1030
- this.pushRegex(t_281);
1031
- i_282 = i_282 + 1;
868
+ this.pushRegex(t_287);
869
+ i_288 = i_288 + 1;
1032
870
  } else {
1033
- break s__1244_283;
871
+ return_285 = void 0;
872
+ break s__1255_289;
1034
873
  }
1035
874
  }
1036
- throw noResultException__184;
875
+ throw bubbleException__213;
1037
876
  }
1038
- return return_277;
877
+ return return_285;
1039
878
  }
1040
879
  /**
1041
- * @param {CodePart} codePart_285
1042
- * @returns {"Unsupported type: Int | Null"}
880
+ * @param {CodePart} codePart_291
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;
883
+ maxCode(codePart_291) {
884
+ let return_292;
1052
885
  let t_293;
1053
886
  let t_294;
1054
887
  let t_295;
@@ -1059,242 +892,181 @@ class RegexFormatter_151 {
1059
892
  let t_300;
1060
893
  let t_301;
1061
894
  let t_302;
1062
- let t_303;
1063
- let t_304;
1064
- let t_305;
1065
- let t_306;
1066
895
  try {
1067
- requireInstanceOf__182(codePart_285, CodePoints);
1068
- t_300 = true;
896
+ requireInstanceOf__211(codePart_291, CodePoints);
897
+ t_299 = true;
1069
898
  } catch {
1070
- t_300 = false;
899
+ t_299 = false;
1071
900
  }
1072
- s__1246_307: {
1073
- if (t_300) {
901
+ s__1257_303: {
902
+ if (t_299) {
1074
903
  try {
1075
- t_301 = requireInstanceOf__182(codePart_285, CodePoints);
904
+ t_300 = requireInstanceOf__211(codePart_291, CodePoints);
1076
905
  } catch {
1077
- break s__1246_307;
906
+ break s__1257_303;
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_304 = t_300.value;
909
+ if (! value_304) {
910
+ return_292 = 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_305 = 0;
913
+ t_293 = stringCodePoints_74(value_304);
914
+ let slice_306 = t_293;
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_306.isEmpty) {
917
+ const next_307 = slice_306.read();
918
+ if (gtGeneric_102(next_307, max_305)) {
919
+ max_305 = next_307;
920
+ } else {
921
+ void 0;
1095
922
  }
1096
- t_295 = slice_310.advance(1);
1097
- slice_310 = t_295;
923
+ t_294 = slice_306.advance(1);
924
+ slice_306 = t_294;
1098
925
  } else {
1099
926
  break;
1100
927
  }
1101
928
  }
1102
- t_302 = max_309;
1103
- t_303 = t_302;
929
+ return_292 = max_305;
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__211(codePart_291, CodeRange);
934
+ t_301 = true;
1110
935
  } catch {
1111
- t_304 = false;
936
+ t_301 = false;
1112
937
  }
1113
- if (t_304) {
938
+ if (t_301) {
939
+ try {
940
+ t_302 = requireInstanceOf__211(codePart_291, CodeRange);
941
+ t_295 = t_302.max;
942
+ return_292 = t_295;
943
+ } catch {
944
+ break s__1257_303;
945
+ }
946
+ } else if (eqGeneric_99(codePart_291, Digit)) {
947
+ t_296 = stringCodePoints_74("9").read();
1114
948
  try {
1115
- t_305 = requireInstanceOf__182(codePart_285, CodeRange);
949
+ return_292 = t_296;
1116
950
  } catch {
1117
- break s__1246_307;
951
+ break s__1257_303;
952
+ }
953
+ } else if (eqGeneric_99(codePart_291, Space)) {
954
+ t_297 = stringCodePoints_74(" ").read();
955
+ try {
956
+ return_292 = t_297;
957
+ } catch {
958
+ break s__1257_303;
959
+ }
960
+ } else if (eqGeneric_99(codePart_291, Word)) {
961
+ t_298 = stringCodePoints_74("z").read();
962
+ try {
963
+ return_292 = t_298;
964
+ } catch {
965
+ break s__1257_303;
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_292 = null;
1135
969
  }
1136
970
  }
1137
- try {
1138
- return_286 = t_306;
1139
- return return_286;
1140
- } catch {
1141
- }
971
+ return return_292;
1142
972
  }
1143
- throw noResultException__184;
973
+ throw bubbleException__213;
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_308 */
976
+ constructor(out_308) {
977
+ let t_309;
978
+ if (!(out_308 !== void 0)) {
979
+ t_309 = [];
980
+ out_308 = t_309;
1153
981
  }
1154
- this.#out_155 = out_312;
982
+ this.#out_188 = out_308;
1155
983
  return;
1156
984
  }
1157
985
  }
1158
- class Begin_315 {
1159
- /** */
986
+ class Begin_310 {
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_310);
992
+ /** @type {Begin_310} */
993
+ export const Begin = new Begin_310();
994
+ class Dot_311 {
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_311);
1000
+ /** @type {Dot_311} */
1001
+ export const Dot = new Dot_311();
1002
+ class End_312 {
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_312);
1008
+ /** @type {End_312} */
1009
+ export const End = new End_312();
1010
+ class WordBoundary_313 {
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_313);
1016
+ /** @type {WordBoundary_313} */
1017
+ export const WordBoundary = new WordBoundary_313();
1018
+ class Digit_314 {
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_314);
1024
+ /** @type {Digit_314} */
1025
+ export const Digit = new Digit_314();
1026
+ class Space_315 {
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_315);
1032
+ /** @type {Space_315} */
1033
+ export const Space = new Space_315();
1034
+ class Word_316 {
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_316);
1040
+ /** @type {Word_316} */
1041
+ export const Word = new Word_316();
1256
1042
  /**
1257
- * @param {Regex} item_336
1043
+ * @param {Regex} item_317
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_317) {
1047
+ return new Sequence(listify_3(Begin, item_317, End));
1265
1048
  };
1266
1049
  /**
1267
- * @param {Regex} item_339
1268
- * @param {boolean} reluctant_340
1050
+ * @param {Regex} item_318
1051
+ * @param {boolean} reluctant_319
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_318, reluctant_319) {
1055
+ if (!(reluctant_319 !== void 0)) {
1056
+ reluctant_319 = 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_318, 1, null, reluctant_319);
1279
1059
  };
1280
1060
  /**
1281
- * @param {Regex} item_343
1282
- * @param {boolean} reluctant_344
1061
+ * @param {Regex} item_320
1062
+ * @param {boolean} reluctant_321
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_320, reluctant_321) {
1066
+ if (!(reluctant_321 !== void 0)) {
1067
+ reluctant_321 = 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_320, 0, 1, reluctant_321);
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_159} */
1072
+ const regexRefs_181 = new RegexRefs_159();