@superblocksteam/library-shared 2.0.21-next.9 → 2.0.21
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/dist/pages.d.ts +6 -0
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +6 -0
- package/dist/pages.js.map +1 -1
- package/dist/pegs/find-string-interpolation.d.ts +12 -0
- package/dist/pegs/find-string-interpolation.d.ts.map +1 -0
- package/dist/pegs/find-string-interpolation.js +773 -0
- package/dist/pegs/find-string-interpolation.js.map +1 -0
- package/dist/props/prop-types.d.ts +13 -2
- package/dist/props/prop-types.d.ts.map +1 -1
- package/dist/props/prop-types.js +5 -0
- package/dist/props/prop-types.js.map +1 -1
- package/dist/types/ai.d.ts +52 -10
- package/dist/types/ai.d.ts.map +1 -1
- package/dist/types/ai.js +23 -1
- package/dist/types/ai.js.map +1 -1
- package/dist/types/events.d.ts +1 -1
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/socket.d.ts +4 -5
- package/dist/types/socket.d.ts.map +1 -1
- package/dist/types/vite.d.ts +17 -6
- package/dist/types/vite.d.ts.map +1 -1
- package/dist/types/vite.js +3 -1
- package/dist/types/vite.js.map +1 -1
- package/dist/utils/strings.d.ts +10 -0
- package/dist/utils/strings.d.ts.map +1 -1
- package/dist/utils/strings.js +4 -0
- package/dist/utils/strings.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,773 @@
|
|
|
1
|
+
// @generated by Peggy 5.0.5.
|
|
2
|
+
//
|
|
3
|
+
// https://peggyjs.org/
|
|
4
|
+
class peg$SyntaxError extends SyntaxError {
|
|
5
|
+
constructor(message, expected, found, location) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.expected = expected;
|
|
8
|
+
this.found = found;
|
|
9
|
+
this.location = location;
|
|
10
|
+
this.name = "SyntaxError";
|
|
11
|
+
}
|
|
12
|
+
format(sources) {
|
|
13
|
+
let str = "Error: " + this.message;
|
|
14
|
+
if (this.location) {
|
|
15
|
+
let src = null;
|
|
16
|
+
const st = sources.find(s => s.source === this.location.source);
|
|
17
|
+
if (st) {
|
|
18
|
+
src = st.text.split(/\r\n|\n|\r/g);
|
|
19
|
+
}
|
|
20
|
+
const s = this.location.start;
|
|
21
|
+
const offset_s = (this.location.source && (typeof this.location.source.offset === "function"))
|
|
22
|
+
? this.location.source.offset(s)
|
|
23
|
+
: s;
|
|
24
|
+
const loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;
|
|
25
|
+
if (src) {
|
|
26
|
+
const e = this.location.end;
|
|
27
|
+
const filler = "".padEnd(offset_s.line.toString().length, " ");
|
|
28
|
+
const line = src[s.line - 1];
|
|
29
|
+
const last = s.line === e.line ? e.column : line.length + 1;
|
|
30
|
+
const hatLen = (last - s.column) || 1;
|
|
31
|
+
str += "\n --> " + loc + "\n"
|
|
32
|
+
+ filler + " |\n"
|
|
33
|
+
+ offset_s.line + " | " + line + "\n"
|
|
34
|
+
+ filler + " | " + "".padEnd(s.column - 1, " ")
|
|
35
|
+
+ "".padEnd(hatLen, "^");
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
str += "\n at " + loc;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return str;
|
|
42
|
+
}
|
|
43
|
+
static buildMessage(expected, found) {
|
|
44
|
+
function hex(ch) {
|
|
45
|
+
return ch.codePointAt(0).toString(16).toUpperCase();
|
|
46
|
+
}
|
|
47
|
+
const nonPrintable = Object.prototype.hasOwnProperty.call(RegExp.prototype, "unicode")
|
|
48
|
+
? new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]", "gu")
|
|
49
|
+
: null;
|
|
50
|
+
function unicodeEscape(s) {
|
|
51
|
+
if (nonPrintable) {
|
|
52
|
+
return s.replace(nonPrintable, ch => "\\u{" + hex(ch) + "}");
|
|
53
|
+
}
|
|
54
|
+
return s;
|
|
55
|
+
}
|
|
56
|
+
function literalEscape(s) {
|
|
57
|
+
return unicodeEscape(s
|
|
58
|
+
.replace(/\\/g, "\\\\")
|
|
59
|
+
.replace(/"/g, "\\\"")
|
|
60
|
+
.replace(/\0/g, "\\0")
|
|
61
|
+
.replace(/\t/g, "\\t")
|
|
62
|
+
.replace(/\n/g, "\\n")
|
|
63
|
+
.replace(/\r/g, "\\r")
|
|
64
|
+
.replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
|
|
65
|
+
.replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
|
|
66
|
+
}
|
|
67
|
+
function classEscape(s) {
|
|
68
|
+
return unicodeEscape(s
|
|
69
|
+
.replace(/\\/g, "\\\\")
|
|
70
|
+
.replace(/\]/g, "\\]")
|
|
71
|
+
.replace(/\^/g, "\\^")
|
|
72
|
+
.replace(/-/g, "\\-")
|
|
73
|
+
.replace(/\0/g, "\\0")
|
|
74
|
+
.replace(/\t/g, "\\t")
|
|
75
|
+
.replace(/\n/g, "\\n")
|
|
76
|
+
.replace(/\r/g, "\\r")
|
|
77
|
+
.replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
|
|
78
|
+
.replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
|
|
79
|
+
}
|
|
80
|
+
const DESCRIBE_EXPECTATION_FNS = {
|
|
81
|
+
literal(expectation) {
|
|
82
|
+
return "\"" + literalEscape(expectation.text) + "\"";
|
|
83
|
+
},
|
|
84
|
+
class(expectation) {
|
|
85
|
+
const escapedParts = expectation.parts.map(part => (Array.isArray(part)
|
|
86
|
+
? classEscape(part[0]) + "-" + classEscape(part[1])
|
|
87
|
+
: classEscape(part)));
|
|
88
|
+
return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]" + (expectation.unicode ? "u" : "");
|
|
89
|
+
},
|
|
90
|
+
any() {
|
|
91
|
+
return "any character";
|
|
92
|
+
},
|
|
93
|
+
end() {
|
|
94
|
+
return "end of input";
|
|
95
|
+
},
|
|
96
|
+
other(expectation) {
|
|
97
|
+
return expectation.description;
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
function describeExpectation(expectation) {
|
|
101
|
+
return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
|
|
102
|
+
}
|
|
103
|
+
function describeExpected(expected) {
|
|
104
|
+
const descriptions = expected.map(describeExpectation);
|
|
105
|
+
descriptions.sort();
|
|
106
|
+
if (descriptions.length > 0) {
|
|
107
|
+
let j = 1;
|
|
108
|
+
for (let i = 1; i < descriptions.length; i++) {
|
|
109
|
+
if (descriptions[i - 1] !== descriptions[i]) {
|
|
110
|
+
descriptions[j] = descriptions[i];
|
|
111
|
+
j++;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
descriptions.length = j;
|
|
115
|
+
}
|
|
116
|
+
switch (descriptions.length) {
|
|
117
|
+
case 1:
|
|
118
|
+
return descriptions[0];
|
|
119
|
+
case 2:
|
|
120
|
+
return descriptions[0] + " or " + descriptions[1];
|
|
121
|
+
default:
|
|
122
|
+
return descriptions.slice(0, -1).join(", ")
|
|
123
|
+
+ ", or "
|
|
124
|
+
+ descriptions[descriptions.length - 1];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function describeFound(found) {
|
|
128
|
+
return found ? "\"" + literalEscape(found) + "\"" : "end of input";
|
|
129
|
+
}
|
|
130
|
+
return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function peg$parse(input, options) {
|
|
134
|
+
options = options !== undefined ? options : {};
|
|
135
|
+
const peg$FAILED = {};
|
|
136
|
+
const peg$source = options.grammarSource;
|
|
137
|
+
const peg$startRuleFunctions = {
|
|
138
|
+
start: peg$parsestart,
|
|
139
|
+
};
|
|
140
|
+
let peg$startRuleFunction = peg$parsestart;
|
|
141
|
+
const peg$c0 = "`";
|
|
142
|
+
const peg$c1 = "${";
|
|
143
|
+
const peg$c2 = "}";
|
|
144
|
+
const peg$e0 = peg$literalExpectation("`", false);
|
|
145
|
+
const peg$e1 = peg$literalExpectation("${", false);
|
|
146
|
+
const peg$e2 = peg$literalExpectation("}", false);
|
|
147
|
+
const peg$e3 = peg$anyExpectation();
|
|
148
|
+
function peg$f0(body) {
|
|
149
|
+
return {
|
|
150
|
+
type: "wrapped-template",
|
|
151
|
+
value: body.content,
|
|
152
|
+
range: body.range
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function peg$f1(body) {
|
|
156
|
+
return {
|
|
157
|
+
type: "bare-template",
|
|
158
|
+
value: body.content,
|
|
159
|
+
range: body.range
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function peg$f2(content) {
|
|
163
|
+
const r = range();
|
|
164
|
+
return {
|
|
165
|
+
content: content,
|
|
166
|
+
range: {
|
|
167
|
+
start: r.start,
|
|
168
|
+
end: r.end
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function peg$f3() {
|
|
173
|
+
return {
|
|
174
|
+
type: "text",
|
|
175
|
+
value: text(),
|
|
176
|
+
range: range()
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
let peg$currPos = options.peg$currPos | 0;
|
|
180
|
+
let peg$savedPos = peg$currPos;
|
|
181
|
+
const peg$posDetailsCache = [{ line: 1, column: 1 }];
|
|
182
|
+
let peg$maxFailPos = peg$currPos;
|
|
183
|
+
let peg$maxFailExpected = options.peg$maxFailExpected || [];
|
|
184
|
+
let peg$silentFails = options.peg$silentFails | 0;
|
|
185
|
+
let peg$result;
|
|
186
|
+
if (options.startRule) {
|
|
187
|
+
if (!(options.startRule in peg$startRuleFunctions)) {
|
|
188
|
+
throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
|
|
189
|
+
}
|
|
190
|
+
peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
|
|
191
|
+
}
|
|
192
|
+
function text() {
|
|
193
|
+
return input.substring(peg$savedPos, peg$currPos);
|
|
194
|
+
}
|
|
195
|
+
function offset() {
|
|
196
|
+
return peg$savedPos;
|
|
197
|
+
}
|
|
198
|
+
function range() {
|
|
199
|
+
return {
|
|
200
|
+
source: peg$source,
|
|
201
|
+
start: peg$savedPos,
|
|
202
|
+
end: peg$currPos,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function location() {
|
|
206
|
+
return peg$computeLocation(peg$savedPos, peg$currPos);
|
|
207
|
+
}
|
|
208
|
+
function expected(description, location) {
|
|
209
|
+
location = location !== undefined
|
|
210
|
+
? location
|
|
211
|
+
: peg$computeLocation(peg$savedPos, peg$currPos);
|
|
212
|
+
throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location);
|
|
213
|
+
}
|
|
214
|
+
function error(message, location) {
|
|
215
|
+
location = location !== undefined
|
|
216
|
+
? location
|
|
217
|
+
: peg$computeLocation(peg$savedPos, peg$currPos);
|
|
218
|
+
throw peg$buildSimpleError(message, location);
|
|
219
|
+
}
|
|
220
|
+
function peg$getUnicode(pos = peg$currPos) {
|
|
221
|
+
const cp = input.codePointAt(pos);
|
|
222
|
+
if (cp === undefined) {
|
|
223
|
+
return "";
|
|
224
|
+
}
|
|
225
|
+
return String.fromCodePoint(cp);
|
|
226
|
+
}
|
|
227
|
+
function peg$literalExpectation(text, ignoreCase) {
|
|
228
|
+
return { type: "literal", text, ignoreCase };
|
|
229
|
+
}
|
|
230
|
+
function peg$classExpectation(parts, inverted, ignoreCase, unicode) {
|
|
231
|
+
return { type: "class", parts, inverted, ignoreCase, unicode };
|
|
232
|
+
}
|
|
233
|
+
function peg$anyExpectation() {
|
|
234
|
+
return { type: "any" };
|
|
235
|
+
}
|
|
236
|
+
function peg$endExpectation() {
|
|
237
|
+
return { type: "end" };
|
|
238
|
+
}
|
|
239
|
+
function peg$otherExpectation(description) {
|
|
240
|
+
return { type: "other", description };
|
|
241
|
+
}
|
|
242
|
+
function peg$computePosDetails(pos) {
|
|
243
|
+
let details = peg$posDetailsCache[pos];
|
|
244
|
+
let p;
|
|
245
|
+
if (details) {
|
|
246
|
+
return details;
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
if (pos >= peg$posDetailsCache.length) {
|
|
250
|
+
p = peg$posDetailsCache.length - 1;
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
p = pos;
|
|
254
|
+
while (!peg$posDetailsCache[--p]) { }
|
|
255
|
+
}
|
|
256
|
+
details = peg$posDetailsCache[p];
|
|
257
|
+
details = {
|
|
258
|
+
line: details.line,
|
|
259
|
+
column: details.column,
|
|
260
|
+
};
|
|
261
|
+
while (p < pos) {
|
|
262
|
+
if (input.charCodeAt(p) === 10) {
|
|
263
|
+
details.line++;
|
|
264
|
+
details.column = 1;
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
details.column++;
|
|
268
|
+
}
|
|
269
|
+
p++;
|
|
270
|
+
}
|
|
271
|
+
peg$posDetailsCache[pos] = details;
|
|
272
|
+
return details;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
function peg$computeLocation(startPos, endPos, offset) {
|
|
276
|
+
const startPosDetails = peg$computePosDetails(startPos);
|
|
277
|
+
const endPosDetails = peg$computePosDetails(endPos);
|
|
278
|
+
const res = {
|
|
279
|
+
source: peg$source,
|
|
280
|
+
start: {
|
|
281
|
+
offset: startPos,
|
|
282
|
+
line: startPosDetails.line,
|
|
283
|
+
column: startPosDetails.column,
|
|
284
|
+
},
|
|
285
|
+
end: {
|
|
286
|
+
offset: endPos,
|
|
287
|
+
line: endPosDetails.line,
|
|
288
|
+
column: endPosDetails.column,
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
if (offset && peg$source && (typeof peg$source.offset === "function")) {
|
|
292
|
+
res.start = peg$source.offset(res.start);
|
|
293
|
+
res.end = peg$source.offset(res.end);
|
|
294
|
+
}
|
|
295
|
+
return res;
|
|
296
|
+
}
|
|
297
|
+
function peg$fail(expected) {
|
|
298
|
+
if (peg$currPos < peg$maxFailPos) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
if (peg$currPos > peg$maxFailPos) {
|
|
302
|
+
peg$maxFailPos = peg$currPos;
|
|
303
|
+
peg$maxFailExpected = [];
|
|
304
|
+
}
|
|
305
|
+
peg$maxFailExpected.push(expected);
|
|
306
|
+
}
|
|
307
|
+
function peg$buildSimpleError(message, location) {
|
|
308
|
+
return new peg$SyntaxError(message, null, null, location);
|
|
309
|
+
}
|
|
310
|
+
function peg$buildStructuredError(expected, found, location) {
|
|
311
|
+
return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location);
|
|
312
|
+
}
|
|
313
|
+
function peg$parsestart() {
|
|
314
|
+
let s0, s1;
|
|
315
|
+
s0 = [];
|
|
316
|
+
s1 = peg$parsewrapped_template();
|
|
317
|
+
if (s1 === peg$FAILED) {
|
|
318
|
+
s1 = peg$parsebare_template();
|
|
319
|
+
if (s1 === peg$FAILED) {
|
|
320
|
+
s1 = peg$parsetext();
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
while (s1 !== peg$FAILED) {
|
|
324
|
+
s0.push(s1);
|
|
325
|
+
s1 = peg$parsewrapped_template();
|
|
326
|
+
if (s1 === peg$FAILED) {
|
|
327
|
+
s1 = peg$parsebare_template();
|
|
328
|
+
if (s1 === peg$FAILED) {
|
|
329
|
+
s1 = peg$parsetext();
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return s0;
|
|
334
|
+
}
|
|
335
|
+
function peg$parsewrapped_template() {
|
|
336
|
+
let s0, s1, s2, s3;
|
|
337
|
+
s0 = peg$currPos;
|
|
338
|
+
if (input.charCodeAt(peg$currPos) === 96) {
|
|
339
|
+
s1 = peg$c0;
|
|
340
|
+
peg$currPos++;
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
s1 = peg$FAILED;
|
|
344
|
+
if (peg$silentFails === 0) {
|
|
345
|
+
peg$fail(peg$e0);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
if (s1 !== peg$FAILED) {
|
|
349
|
+
s2 = peg$parsetemplate_body();
|
|
350
|
+
if (s2 !== peg$FAILED) {
|
|
351
|
+
if (input.charCodeAt(peg$currPos) === 96) {
|
|
352
|
+
s3 = peg$c0;
|
|
353
|
+
peg$currPos++;
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
s3 = peg$FAILED;
|
|
357
|
+
if (peg$silentFails === 0) {
|
|
358
|
+
peg$fail(peg$e0);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
if (s3 !== peg$FAILED) {
|
|
362
|
+
peg$savedPos = s0;
|
|
363
|
+
s0 = peg$f0(s2);
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
peg$currPos = s0;
|
|
367
|
+
s0 = peg$FAILED;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
peg$currPos = s0;
|
|
372
|
+
s0 = peg$FAILED;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
peg$currPos = s0;
|
|
377
|
+
s0 = peg$FAILED;
|
|
378
|
+
}
|
|
379
|
+
return s0;
|
|
380
|
+
}
|
|
381
|
+
function peg$parsebare_template() {
|
|
382
|
+
let s0, s1;
|
|
383
|
+
s0 = peg$currPos;
|
|
384
|
+
s1 = peg$parsetemplate_body();
|
|
385
|
+
if (s1 !== peg$FAILED) {
|
|
386
|
+
peg$savedPos = s0;
|
|
387
|
+
s1 = peg$f1(s1);
|
|
388
|
+
}
|
|
389
|
+
s0 = s1;
|
|
390
|
+
return s0;
|
|
391
|
+
}
|
|
392
|
+
function peg$parsetemplate_body() {
|
|
393
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
394
|
+
s0 = peg$currPos;
|
|
395
|
+
if (input.substr(peg$currPos, 2) === peg$c1) {
|
|
396
|
+
s1 = peg$c1;
|
|
397
|
+
peg$currPos += 2;
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
s1 = peg$FAILED;
|
|
401
|
+
if (peg$silentFails === 0) {
|
|
402
|
+
peg$fail(peg$e1);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
if (s1 !== peg$FAILED) {
|
|
406
|
+
s2 = peg$currPos;
|
|
407
|
+
s3 = [];
|
|
408
|
+
s4 = peg$currPos;
|
|
409
|
+
s5 = peg$currPos;
|
|
410
|
+
peg$silentFails++;
|
|
411
|
+
if (input.charCodeAt(peg$currPos) === 125) {
|
|
412
|
+
s6 = peg$c2;
|
|
413
|
+
peg$currPos++;
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
s6 = peg$FAILED;
|
|
417
|
+
if (peg$silentFails === 0) {
|
|
418
|
+
peg$fail(peg$e2);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
peg$silentFails--;
|
|
422
|
+
if (s6 === peg$FAILED) {
|
|
423
|
+
s5 = undefined;
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
peg$currPos = s5;
|
|
427
|
+
s5 = peg$FAILED;
|
|
428
|
+
}
|
|
429
|
+
if (s5 !== peg$FAILED) {
|
|
430
|
+
if (input.length > peg$currPos) {
|
|
431
|
+
s6 = input.charAt(peg$currPos);
|
|
432
|
+
peg$currPos++;
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
s6 = peg$FAILED;
|
|
436
|
+
if (peg$silentFails === 0) {
|
|
437
|
+
peg$fail(peg$e3);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
if (s6 !== peg$FAILED) {
|
|
441
|
+
s5 = [s5, s6];
|
|
442
|
+
s4 = s5;
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
peg$currPos = s4;
|
|
446
|
+
s4 = peg$FAILED;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
peg$currPos = s4;
|
|
451
|
+
s4 = peg$FAILED;
|
|
452
|
+
}
|
|
453
|
+
while (s4 !== peg$FAILED) {
|
|
454
|
+
s3.push(s4);
|
|
455
|
+
s4 = peg$currPos;
|
|
456
|
+
s5 = peg$currPos;
|
|
457
|
+
peg$silentFails++;
|
|
458
|
+
if (input.charCodeAt(peg$currPos) === 125) {
|
|
459
|
+
s6 = peg$c2;
|
|
460
|
+
peg$currPos++;
|
|
461
|
+
}
|
|
462
|
+
else {
|
|
463
|
+
s6 = peg$FAILED;
|
|
464
|
+
if (peg$silentFails === 0) {
|
|
465
|
+
peg$fail(peg$e2);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
peg$silentFails--;
|
|
469
|
+
if (s6 === peg$FAILED) {
|
|
470
|
+
s5 = undefined;
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
473
|
+
peg$currPos = s5;
|
|
474
|
+
s5 = peg$FAILED;
|
|
475
|
+
}
|
|
476
|
+
if (s5 !== peg$FAILED) {
|
|
477
|
+
if (input.length > peg$currPos) {
|
|
478
|
+
s6 = input.charAt(peg$currPos);
|
|
479
|
+
peg$currPos++;
|
|
480
|
+
}
|
|
481
|
+
else {
|
|
482
|
+
s6 = peg$FAILED;
|
|
483
|
+
if (peg$silentFails === 0) {
|
|
484
|
+
peg$fail(peg$e3);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
if (s6 !== peg$FAILED) {
|
|
488
|
+
s5 = [s5, s6];
|
|
489
|
+
s4 = s5;
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
peg$currPos = s4;
|
|
493
|
+
s4 = peg$FAILED;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
peg$currPos = s4;
|
|
498
|
+
s4 = peg$FAILED;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
s2 = input.substring(s2, peg$currPos);
|
|
502
|
+
if (input.charCodeAt(peg$currPos) === 125) {
|
|
503
|
+
s3 = peg$c2;
|
|
504
|
+
peg$currPos++;
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
s3 = peg$FAILED;
|
|
508
|
+
if (peg$silentFails === 0) {
|
|
509
|
+
peg$fail(peg$e2);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
if (s3 !== peg$FAILED) {
|
|
513
|
+
peg$savedPos = s0;
|
|
514
|
+
s0 = peg$f2(s2);
|
|
515
|
+
}
|
|
516
|
+
else {
|
|
517
|
+
peg$currPos = s0;
|
|
518
|
+
s0 = peg$FAILED;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
else {
|
|
522
|
+
peg$currPos = s0;
|
|
523
|
+
s0 = peg$FAILED;
|
|
524
|
+
}
|
|
525
|
+
return s0;
|
|
526
|
+
}
|
|
527
|
+
function peg$parsetext() {
|
|
528
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8;
|
|
529
|
+
s0 = peg$currPos;
|
|
530
|
+
s1 = peg$currPos;
|
|
531
|
+
s2 = [];
|
|
532
|
+
s3 = peg$currPos;
|
|
533
|
+
s4 = peg$currPos;
|
|
534
|
+
peg$silentFails++;
|
|
535
|
+
s5 = peg$currPos;
|
|
536
|
+
if (input.charCodeAt(peg$currPos) === 96) {
|
|
537
|
+
s6 = peg$c0;
|
|
538
|
+
peg$currPos++;
|
|
539
|
+
}
|
|
540
|
+
else {
|
|
541
|
+
s6 = peg$FAILED;
|
|
542
|
+
if (peg$silentFails === 0) {
|
|
543
|
+
peg$fail(peg$e0);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
if (s6 !== peg$FAILED) {
|
|
547
|
+
s7 = peg$parsetemplate_body();
|
|
548
|
+
if (s7 !== peg$FAILED) {
|
|
549
|
+
if (input.charCodeAt(peg$currPos) === 96) {
|
|
550
|
+
s8 = peg$c0;
|
|
551
|
+
peg$currPos++;
|
|
552
|
+
}
|
|
553
|
+
else {
|
|
554
|
+
s8 = peg$FAILED;
|
|
555
|
+
if (peg$silentFails === 0) {
|
|
556
|
+
peg$fail(peg$e0);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
if (s8 !== peg$FAILED) {
|
|
560
|
+
s6 = [s6, s7, s8];
|
|
561
|
+
s5 = s6;
|
|
562
|
+
}
|
|
563
|
+
else {
|
|
564
|
+
peg$currPos = s5;
|
|
565
|
+
s5 = peg$FAILED;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
else {
|
|
569
|
+
peg$currPos = s5;
|
|
570
|
+
s5 = peg$FAILED;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
else {
|
|
574
|
+
peg$currPos = s5;
|
|
575
|
+
s5 = peg$FAILED;
|
|
576
|
+
}
|
|
577
|
+
peg$silentFails--;
|
|
578
|
+
if (s5 === peg$FAILED) {
|
|
579
|
+
s4 = undefined;
|
|
580
|
+
}
|
|
581
|
+
else {
|
|
582
|
+
peg$currPos = s4;
|
|
583
|
+
s4 = peg$FAILED;
|
|
584
|
+
}
|
|
585
|
+
if (s4 !== peg$FAILED) {
|
|
586
|
+
s5 = peg$currPos;
|
|
587
|
+
peg$silentFails++;
|
|
588
|
+
s6 = peg$parsetemplate_body();
|
|
589
|
+
peg$silentFails--;
|
|
590
|
+
if (s6 === peg$FAILED) {
|
|
591
|
+
s5 = undefined;
|
|
592
|
+
}
|
|
593
|
+
else {
|
|
594
|
+
peg$currPos = s5;
|
|
595
|
+
s5 = peg$FAILED;
|
|
596
|
+
}
|
|
597
|
+
if (s5 !== peg$FAILED) {
|
|
598
|
+
if (input.length > peg$currPos) {
|
|
599
|
+
s6 = input.charAt(peg$currPos);
|
|
600
|
+
peg$currPos++;
|
|
601
|
+
}
|
|
602
|
+
else {
|
|
603
|
+
s6 = peg$FAILED;
|
|
604
|
+
if (peg$silentFails === 0) {
|
|
605
|
+
peg$fail(peg$e3);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
if (s6 !== peg$FAILED) {
|
|
609
|
+
s4 = [s4, s5, s6];
|
|
610
|
+
s3 = s4;
|
|
611
|
+
}
|
|
612
|
+
else {
|
|
613
|
+
peg$currPos = s3;
|
|
614
|
+
s3 = peg$FAILED;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
peg$currPos = s3;
|
|
619
|
+
s3 = peg$FAILED;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
else {
|
|
623
|
+
peg$currPos = s3;
|
|
624
|
+
s3 = peg$FAILED;
|
|
625
|
+
}
|
|
626
|
+
if (s3 !== peg$FAILED) {
|
|
627
|
+
while (s3 !== peg$FAILED) {
|
|
628
|
+
s2.push(s3);
|
|
629
|
+
s3 = peg$currPos;
|
|
630
|
+
s4 = peg$currPos;
|
|
631
|
+
peg$silentFails++;
|
|
632
|
+
s5 = peg$currPos;
|
|
633
|
+
if (input.charCodeAt(peg$currPos) === 96) {
|
|
634
|
+
s6 = peg$c0;
|
|
635
|
+
peg$currPos++;
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
s6 = peg$FAILED;
|
|
639
|
+
if (peg$silentFails === 0) {
|
|
640
|
+
peg$fail(peg$e0);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
if (s6 !== peg$FAILED) {
|
|
644
|
+
s7 = peg$parsetemplate_body();
|
|
645
|
+
if (s7 !== peg$FAILED) {
|
|
646
|
+
if (input.charCodeAt(peg$currPos) === 96) {
|
|
647
|
+
s8 = peg$c0;
|
|
648
|
+
peg$currPos++;
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
s8 = peg$FAILED;
|
|
652
|
+
if (peg$silentFails === 0) {
|
|
653
|
+
peg$fail(peg$e0);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
if (s8 !== peg$FAILED) {
|
|
657
|
+
s6 = [s6, s7, s8];
|
|
658
|
+
s5 = s6;
|
|
659
|
+
}
|
|
660
|
+
else {
|
|
661
|
+
peg$currPos = s5;
|
|
662
|
+
s5 = peg$FAILED;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
else {
|
|
666
|
+
peg$currPos = s5;
|
|
667
|
+
s5 = peg$FAILED;
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
else {
|
|
671
|
+
peg$currPos = s5;
|
|
672
|
+
s5 = peg$FAILED;
|
|
673
|
+
}
|
|
674
|
+
peg$silentFails--;
|
|
675
|
+
if (s5 === peg$FAILED) {
|
|
676
|
+
s4 = undefined;
|
|
677
|
+
}
|
|
678
|
+
else {
|
|
679
|
+
peg$currPos = s4;
|
|
680
|
+
s4 = peg$FAILED;
|
|
681
|
+
}
|
|
682
|
+
if (s4 !== peg$FAILED) {
|
|
683
|
+
s5 = peg$currPos;
|
|
684
|
+
peg$silentFails++;
|
|
685
|
+
s6 = peg$parsetemplate_body();
|
|
686
|
+
peg$silentFails--;
|
|
687
|
+
if (s6 === peg$FAILED) {
|
|
688
|
+
s5 = undefined;
|
|
689
|
+
}
|
|
690
|
+
else {
|
|
691
|
+
peg$currPos = s5;
|
|
692
|
+
s5 = peg$FAILED;
|
|
693
|
+
}
|
|
694
|
+
if (s5 !== peg$FAILED) {
|
|
695
|
+
if (input.length > peg$currPos) {
|
|
696
|
+
s6 = input.charAt(peg$currPos);
|
|
697
|
+
peg$currPos++;
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
s6 = peg$FAILED;
|
|
701
|
+
if (peg$silentFails === 0) {
|
|
702
|
+
peg$fail(peg$e3);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
if (s6 !== peg$FAILED) {
|
|
706
|
+
s4 = [s4, s5, s6];
|
|
707
|
+
s3 = s4;
|
|
708
|
+
}
|
|
709
|
+
else {
|
|
710
|
+
peg$currPos = s3;
|
|
711
|
+
s3 = peg$FAILED;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
else {
|
|
715
|
+
peg$currPos = s3;
|
|
716
|
+
s3 = peg$FAILED;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
else {
|
|
720
|
+
peg$currPos = s3;
|
|
721
|
+
s3 = peg$FAILED;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
else {
|
|
726
|
+
s2 = peg$FAILED;
|
|
727
|
+
}
|
|
728
|
+
if (s2 !== peg$FAILED) {
|
|
729
|
+
s1 = input.substring(s1, peg$currPos);
|
|
730
|
+
}
|
|
731
|
+
else {
|
|
732
|
+
s1 = s2;
|
|
733
|
+
}
|
|
734
|
+
if (s1 !== peg$FAILED) {
|
|
735
|
+
peg$savedPos = s0;
|
|
736
|
+
s1 = peg$f3();
|
|
737
|
+
}
|
|
738
|
+
s0 = s1;
|
|
739
|
+
return s0;
|
|
740
|
+
}
|
|
741
|
+
peg$result = peg$startRuleFunction();
|
|
742
|
+
const peg$success = (peg$result !== peg$FAILED && peg$currPos === input.length);
|
|
743
|
+
function peg$throw() {
|
|
744
|
+
if (peg$result !== peg$FAILED && peg$currPos < input.length) {
|
|
745
|
+
peg$fail(peg$endExpectation());
|
|
746
|
+
}
|
|
747
|
+
throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? peg$getUnicode(peg$maxFailPos) : null, peg$maxFailPos < input.length
|
|
748
|
+
? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
|
|
749
|
+
: peg$computeLocation(peg$maxFailPos, peg$maxFailPos));
|
|
750
|
+
}
|
|
751
|
+
if (options.peg$library) {
|
|
752
|
+
return /** @type {any} */ ({
|
|
753
|
+
peg$result,
|
|
754
|
+
peg$currPos,
|
|
755
|
+
peg$FAILED,
|
|
756
|
+
peg$maxFailExpected,
|
|
757
|
+
peg$maxFailPos,
|
|
758
|
+
peg$success,
|
|
759
|
+
peg$throw: peg$success ? undefined : peg$throw,
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
if (peg$success) {
|
|
763
|
+
return peg$result;
|
|
764
|
+
}
|
|
765
|
+
else {
|
|
766
|
+
peg$throw();
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
const peg$allowedStartRules = [
|
|
770
|
+
"start"
|
|
771
|
+
];
|
|
772
|
+
export { peg$allowedStartRules as StartRules, peg$SyntaxError as SyntaxError, peg$parse as parse };
|
|
773
|
+
//# sourceMappingURL=find-string-interpolation.js.map
|