toolcraft 0.0.117 → 0.0.119

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