@env-spec/parser 0.0.0 → 0.0.1

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/index.mjs ADDED
@@ -0,0 +1,3742 @@
1
+ import { __name, ParsedEnvSpecCommentBlock, ParsedEnvSpecDivider, ParsedEnvSpecComment, ParsedEnvSpecBlankLine, ParsedEnvSpecDecoratorComment, ParsedEnvSpecConfigItem, ParsedEnvSpecFile, ParsedEnvSpecFunctionArgs, ParsedEnvSpecDecorator, ParsedEnvSpecFunctionCall, ParsedEnvSpecKeyValuePair, ParsedEnvSpecStaticValue } from './chunk-FWOHTEQS.mjs';
2
+ export { ParsedEnvSpecBlankLine, ParsedEnvSpecComment, ParsedEnvSpecCommentBlock, ParsedEnvSpecConfigItem, ParsedEnvSpecDecorator, ParsedEnvSpecDecoratorComment, ParsedEnvSpecDivider, ParsedEnvSpecFile, ParsedEnvSpecFunctionArgs, ParsedEnvSpecFunctionCall, ParsedEnvSpecKeyValuePair, ParsedEnvSpecStaticValue, expand } from './chunk-FWOHTEQS.mjs';
3
+
4
+ // src/updater.ts
5
+ function ensureHeader(file, newHeaderContents) {
6
+ if (!file.header) {
7
+ newHeaderContents ||= "This env file uses @env-spec - see https://varlock.dev/env-spec for more info\n";
8
+ file.contents.unshift(
9
+ // header is a comment block at the beginning of the file and must end with a divider
10
+ new ParsedEnvSpecCommentBlock({
11
+ // we'll break up the passed in content and add a comment line for each
12
+ comments: newHeaderContents.split("\n").map((line) => new ParsedEnvSpecComment({ contents: line, leadingSpace: " " })),
13
+ divider: new ParsedEnvSpecDivider({ contents: "----------", leadingSpace: " " })
14
+ }),
15
+ new ParsedEnvSpecBlankLine({})
16
+ // add extra blank line after header
17
+ );
18
+ }
19
+ }
20
+ __name(ensureHeader, "ensureHeader");
21
+ function createDummyDecoratorNode(decoratorName, valueStr, opts) {
22
+ let decStr = `@${decoratorName}`;
23
+ if (opts?.bareFnArgs) decStr += `(${valueStr})`;
24
+ else if (valueStr !== "true" || opts?.explicitTrue) {
25
+ decStr += `=${valueStr}`;
26
+ }
27
+ const parsed = parseEnvSpecDotEnvFile(`# ${decStr}
28
+ # ---`);
29
+ const newDecNode = parsed.decoratorsObject[decoratorName];
30
+ if (!newDecNode) throw new Error("Creating new decorator failed");
31
+ return newDecNode;
32
+ }
33
+ __name(createDummyDecoratorNode, "createDummyDecoratorNode");
34
+ function setRootDecorator(file, decoratorName, valueStr, opts) {
35
+ ensureHeader(file);
36
+ const newDecNode = createDummyDecoratorNode(decoratorName, valueStr, opts);
37
+ const existingDecorator = file.decoratorsObject[decoratorName];
38
+ if (existingDecorator) {
39
+ existingDecorator.data.valueOrFnArgs = newDecNode.data.valueOrFnArgs;
40
+ } else {
41
+ if (!file.header) throw new Error("No header found");
42
+ const lastComment = file.header.data.comments[file.header.data.comments.length - 1];
43
+ let decCommentLine;
44
+ if (lastComment instanceof ParsedEnvSpecDecoratorComment && lastComment.toString().length < 40) {
45
+ decCommentLine = lastComment;
46
+ } else {
47
+ decCommentLine = new ParsedEnvSpecDecoratorComment({
48
+ decorators: [],
49
+ leadingSpace: " ",
50
+ ...opts?.comment && { postComment: `# ${opts.comment}` }
51
+ });
52
+ file.header.data.comments.push(decCommentLine);
53
+ }
54
+ decCommentLine.decorators.push(newDecNode);
55
+ }
56
+ }
57
+ __name(setRootDecorator, "setRootDecorator");
58
+ function setItemDecorator(file, key, decoratorName, valueStr, opts) {
59
+ let item = file.configItems.find((i) => i.key === key);
60
+ if (!item) {
61
+ item = new ParsedEnvSpecConfigItem({
62
+ key,
63
+ value: void 0,
64
+ preComments: [],
65
+ postComment: void 0
66
+ });
67
+ file.contents.push(item);
68
+ }
69
+ const newDecNode = createDummyDecoratorNode(decoratorName, valueStr, opts);
70
+ const existingDecorator = item.decoratorsObject[decoratorName];
71
+ if (existingDecorator) {
72
+ existingDecorator.data.valueOrFnArgs = newDecNode.data.valueOrFnArgs;
73
+ } else {
74
+ const lastComment = item.data.preComments[item.data.preComments.length - 1];
75
+ let decCommentLine;
76
+ if (lastComment instanceof ParsedEnvSpecDecoratorComment && lastComment.toString().length < 40) {
77
+ decCommentLine = lastComment;
78
+ } else {
79
+ decCommentLine = new ParsedEnvSpecDecoratorComment({
80
+ decorators: [],
81
+ leadingSpace: " "
82
+ });
83
+ item.data.preComments.push(decCommentLine);
84
+ }
85
+ decCommentLine.decorators.push(newDecNode);
86
+ }
87
+ }
88
+ __name(setItemDecorator, "setItemDecorator");
89
+ function injectFromStr(file, content, opts) {
90
+ const parsed = parseEnvSpecDotEnvFile(content);
91
+ let injectIndex = file.contents.length;
92
+ if (opts?.location === "start") {
93
+ injectIndex = 0;
94
+ } else if (opts?.location === "after_header") {
95
+ if (file.header) {
96
+ injectIndex = file.contents.indexOf(file.header) + 1;
97
+ } else {
98
+ injectIndex = 0;
99
+ }
100
+ } else if (opts?.location === "items") {
101
+ if (file.configItems[0]) {
102
+ injectIndex = file.contents.indexOf(file.configItems[0]);
103
+ } else if (file.header) {
104
+ injectIndex = file.contents.indexOf(file.header) + 1;
105
+ }
106
+ }
107
+ file.contents.splice(injectIndex, 0, ...parsed.contents);
108
+ }
109
+ __name(injectFromStr, "injectFromStr");
110
+ function deleteItem(file, key) {
111
+ const item = file.configItems.find((i) => i.key === key);
112
+ if (item) {
113
+ file.contents.splice(file.contents.indexOf(item), 1);
114
+ }
115
+ }
116
+ __name(deleteItem, "deleteItem");
117
+ var envSpecUpdater = {
118
+ ensureHeader,
119
+ setRootDecorator,
120
+ setItemDecorator,
121
+ injectFromStr,
122
+ deleteItem
123
+ };
124
+
125
+ // src/grammar.js
126
+ function peg$subclass(child, parent) {
127
+ function C() {
128
+ this.constructor = child;
129
+ }
130
+ __name(C, "C");
131
+ C.prototype = parent.prototype;
132
+ child.prototype = new C();
133
+ }
134
+ __name(peg$subclass, "peg$subclass");
135
+ function peg$SyntaxError(message, expected, found, location) {
136
+ var self = Error.call(this, message);
137
+ if (Object.setPrototypeOf) {
138
+ Object.setPrototypeOf(self, peg$SyntaxError.prototype);
139
+ }
140
+ self.expected = expected;
141
+ self.found = found;
142
+ self.location = location;
143
+ self.name = "SyntaxError";
144
+ return self;
145
+ }
146
+ __name(peg$SyntaxError, "peg$SyntaxError");
147
+ peg$subclass(peg$SyntaxError, Error);
148
+ function peg$padEnd(str, targetLength, padString) {
149
+ padString = padString || " ";
150
+ if (str.length > targetLength) {
151
+ return str;
152
+ }
153
+ targetLength -= str.length;
154
+ padString += padString.repeat(targetLength);
155
+ return str + padString.slice(0, targetLength);
156
+ }
157
+ __name(peg$padEnd, "peg$padEnd");
158
+ peg$SyntaxError.prototype.format = function(sources) {
159
+ var str = "Error: " + this.message;
160
+ if (this.location) {
161
+ var src = null;
162
+ var k;
163
+ for (k = 0; k < sources.length; k++) {
164
+ if (sources[k].source === this.location.source) {
165
+ src = sources[k].text.split(/\r\n|\n|\r/g);
166
+ break;
167
+ }
168
+ }
169
+ var s = this.location.start;
170
+ var offset_s = this.location.source && typeof this.location.source.offset === "function" ? this.location.source.offset(s) : s;
171
+ var loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;
172
+ if (src) {
173
+ var e = this.location.end;
174
+ var filler = peg$padEnd("", offset_s.line.toString().length, " ");
175
+ var line = src[s.line - 1];
176
+ var last = s.line === e.line ? e.column : line.length + 1;
177
+ var hatLen = last - s.column || 1;
178
+ str += "\n --> " + loc + "\n" + filler + " |\n" + offset_s.line + " | " + line + "\n" + filler + " | " + peg$padEnd("", s.column - 1, " ") + peg$padEnd("", hatLen, "^");
179
+ } else {
180
+ str += "\n at " + loc;
181
+ }
182
+ }
183
+ return str;
184
+ };
185
+ peg$SyntaxError.buildMessage = function(expected, found) {
186
+ var DESCRIBE_EXPECTATION_FNS = {
187
+ literal: /* @__PURE__ */ __name(function(expectation) {
188
+ return '"' + literalEscape(expectation.text) + '"';
189
+ }, "literal"),
190
+ class: /* @__PURE__ */ __name(function(expectation) {
191
+ var escapedParts = expectation.parts.map(function(part) {
192
+ return Array.isArray(part) ? classEscape(part[0]) + "-" + classEscape(part[1]) : classEscape(part);
193
+ });
194
+ return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]";
195
+ }, "class"),
196
+ any: /* @__PURE__ */ __name(function() {
197
+ return "any character";
198
+ }, "any"),
199
+ end: /* @__PURE__ */ __name(function() {
200
+ return "end of input";
201
+ }, "end"),
202
+ other: /* @__PURE__ */ __name(function(expectation) {
203
+ return expectation.description;
204
+ }, "other")
205
+ };
206
+ function hex(ch) {
207
+ return ch.charCodeAt(0).toString(16).toUpperCase();
208
+ }
209
+ __name(hex, "hex");
210
+ function literalEscape(s) {
211
+ return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
212
+ return "\\x0" + hex(ch);
213
+ }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) {
214
+ return "\\x" + hex(ch);
215
+ });
216
+ }
217
+ __name(literalEscape, "literalEscape");
218
+ function classEscape(s) {
219
+ return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
220
+ return "\\x0" + hex(ch);
221
+ }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) {
222
+ return "\\x" + hex(ch);
223
+ });
224
+ }
225
+ __name(classEscape, "classEscape");
226
+ function describeExpectation(expectation) {
227
+ return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
228
+ }
229
+ __name(describeExpectation, "describeExpectation");
230
+ function describeExpected(expected2) {
231
+ var descriptions = expected2.map(describeExpectation);
232
+ var i, j;
233
+ descriptions.sort();
234
+ if (descriptions.length > 0) {
235
+ for (i = 1, j = 1; i < descriptions.length; i++) {
236
+ if (descriptions[i - 1] !== descriptions[i]) {
237
+ descriptions[j] = descriptions[i];
238
+ j++;
239
+ }
240
+ }
241
+ descriptions.length = j;
242
+ }
243
+ switch (descriptions.length) {
244
+ case 1:
245
+ return descriptions[0];
246
+ case 2:
247
+ return descriptions[0] + " or " + descriptions[1];
248
+ default:
249
+ return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1];
250
+ }
251
+ }
252
+ __name(describeExpected, "describeExpected");
253
+ function describeFound(found2) {
254
+ return found2 ? '"' + literalEscape(found2) + '"' : "end of input";
255
+ }
256
+ __name(describeFound, "describeFound");
257
+ return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
258
+ };
259
+ function peg$parse(input, options) {
260
+ options = options !== void 0 ? options : {};
261
+ var peg$FAILED = {};
262
+ var peg$source = options.grammarSource;
263
+ var peg$startRuleFunctions = { EnvSpecFile: peg$parseEnvSpecFile };
264
+ var peg$startRuleFunction = peg$parseEnvSpecFile;
265
+ var peg$c0 = "\n";
266
+ var peg$c1 = "export ";
267
+ var peg$c2 = "=";
268
+ var peg$c3 = "#";
269
+ var peg$c4 = "@";
270
+ var peg$c5 = ":";
271
+ var peg$c6 = "()";
272
+ var peg$c7 = "(";
273
+ var peg$c8 = ")";
274
+ var peg$c9 = ",";
275
+ var peg$c10 = '\\"';
276
+ var peg$c11 = "\\'";
277
+ var peg$c12 = "\\`";
278
+ var peg$c13 = '"""';
279
+ var peg$c14 = '\\"""';
280
+ var peg$c15 = "```";
281
+ var peg$c16 = "\\```";
282
+ var peg$r0 = /^[a-zA-Z_]/;
283
+ var peg$r1 = /^[a-zA-Z0-9_.\-]/;
284
+ var peg$r2 = /^[^\n]/;
285
+ var peg$r3 = /^[a-zA-Z]/;
286
+ var peg$r4 = /^[@#]/;
287
+ var peg$r5 = /^[a-zA-Z0-9_]/;
288
+ var peg$r6 = /^[^ \n,)]/;
289
+ var peg$r7 = /^[\-=*#]/;
290
+ var peg$r8 = /^['"`]/;
291
+ var peg$r9 = /^[^#\n]/;
292
+ var peg$r10 = /^[^# \n]/;
293
+ var peg$r11 = /^["]/;
294
+ var peg$r12 = /^[^"\n]/;
295
+ var peg$r13 = /^[']/;
296
+ var peg$r14 = /^[^'\n]/;
297
+ var peg$r15 = /^[`]/;
298
+ var peg$r16 = /^[^`\n]/;
299
+ var peg$r17 = /^[ \t]/;
300
+ var peg$e0 = peg$literalExpectation("\n", false);
301
+ var peg$e1 = peg$literalExpectation("export ", false);
302
+ var peg$e2 = peg$literalExpectation("=", false);
303
+ var peg$e3 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false);
304
+ var peg$e4 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", ".", "-"], false, false);
305
+ var peg$e5 = peg$literalExpectation("#", false);
306
+ var peg$e6 = peg$literalExpectation("@", false);
307
+ var peg$e7 = peg$classExpectation(["\n"], true, false);
308
+ var peg$e8 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false);
309
+ var peg$e9 = peg$literalExpectation(":", false);
310
+ var peg$e10 = peg$classExpectation(["@", "#"], false, false);
311
+ var peg$e11 = peg$literalExpectation("()", false);
312
+ var peg$e12 = peg$literalExpectation("(", false);
313
+ var peg$e13 = peg$literalExpectation(")", false);
314
+ var peg$e14 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false);
315
+ var peg$e15 = peg$literalExpectation(",", false);
316
+ var peg$e16 = peg$classExpectation([" ", "\n", ",", ")"], true, false);
317
+ var peg$e17 = peg$classExpectation(["-", "=", "*", "#"], false, false);
318
+ var peg$e18 = peg$classExpectation(["'", '"', "`"], false, false);
319
+ var peg$e19 = peg$classExpectation(["#", "\n"], true, false);
320
+ var peg$e20 = peg$classExpectation(["#", " ", "\n"], true, false);
321
+ var peg$e21 = peg$classExpectation(['"'], false, false);
322
+ var peg$e22 = peg$literalExpectation('\\"', false);
323
+ var peg$e23 = peg$classExpectation(['"', "\n"], true, false);
324
+ var peg$e24 = peg$classExpectation(["'"], false, false);
325
+ var peg$e25 = peg$literalExpectation("\\'", false);
326
+ var peg$e26 = peg$classExpectation(["'", "\n"], true, false);
327
+ var peg$e27 = peg$classExpectation(["`"], false, false);
328
+ var peg$e28 = peg$literalExpectation("\\`", false);
329
+ var peg$e29 = peg$classExpectation(["`", "\n"], true, false);
330
+ var peg$e30 = peg$literalExpectation('"""', false);
331
+ var peg$e31 = peg$literalExpectation('\\"""', false);
332
+ var peg$e32 = peg$literalExpectation("```", false);
333
+ var peg$e33 = peg$literalExpectation("\\```", false);
334
+ var peg$e34 = peg$anyExpectation();
335
+ var peg$e35 = peg$classExpectation([" ", " "], false, false);
336
+ var peg$f0 = /* @__PURE__ */ __name(function() {
337
+ return new ParsedEnvSpecBlankLine({ _location: location() });
338
+ }, "peg$f0");
339
+ var peg$f1 = /* @__PURE__ */ __name(function(contents) {
340
+ return new ParsedEnvSpecFile(contents);
341
+ }, "peg$f1");
342
+ var peg$f2 = /* @__PURE__ */ __name(function(preComments, key, value, postComment) {
343
+ return new ParsedEnvSpecConfigItem({
344
+ key,
345
+ preComments,
346
+ postComment,
347
+ value,
348
+ _location: location()
349
+ });
350
+ }, "peg$f2");
351
+ var peg$f3 = /* @__PURE__ */ __name(function(comments, end) {
352
+ return new ParsedEnvSpecCommentBlock({
353
+ comments,
354
+ divider: end instanceof ParsedEnvSpecDivider ? end : void 0,
355
+ _location: location()
356
+ });
357
+ }, "peg$f3");
358
+ var peg$f4 = /* @__PURE__ */ __name(function(leadingSpace, contents) {
359
+ return new ParsedEnvSpecComment({
360
+ contents,
361
+ leadingSpace,
362
+ _location: location()
363
+ });
364
+ }, "peg$f4");
365
+ var peg$f5 = /* @__PURE__ */ __name(function(leadingSpace, contents) {
366
+ return new ParsedEnvSpecComment({ contents, leadingSpace, _location: location() });
367
+ }, "peg$f5");
368
+ var peg$f6 = /* @__PURE__ */ __name(function(leadingSpace, first, rest, postComment) {
369
+ return new ParsedEnvSpecDecoratorComment({
370
+ decorators: [first, ...rest],
371
+ leadingSpace,
372
+ postComment,
373
+ _location: location()
374
+ });
375
+ }, "peg$f6");
376
+ var peg$f7 = /* @__PURE__ */ __name(function(name) {
377
+ return new ParsedEnvSpecFunctionArgs({ values: [] });
378
+ }, "peg$f7");
379
+ var peg$f8 = /* @__PURE__ */ __name(function(name, valueOrFnArgs) {
380
+ return new ParsedEnvSpecDecorator({
381
+ name,
382
+ valueOrFnArgs,
383
+ _location: location()
384
+ });
385
+ }, "peg$f8");
386
+ var peg$f9 = /* @__PURE__ */ __name(function(name, args) {
387
+ return new ParsedEnvSpecFunctionCall({
388
+ name,
389
+ args: args || new ParsedEnvSpecFunctionArgs({ values: [] }),
390
+ _location: location()
391
+ });
392
+ }, "peg$f9");
393
+ var peg$f10 = /* @__PURE__ */ __name(function(key, val) {
394
+ return new ParsedEnvSpecKeyValuePair({ key, val });
395
+ }, "peg$f10");
396
+ var peg$f11 = /* @__PURE__ */ __name(function(values) {
397
+ return new ParsedEnvSpecFunctionArgs({
398
+ values,
399
+ _location: location()
400
+ });
401
+ }, "peg$f11");
402
+ var peg$f12 = /* @__PURE__ */ __name(function() {
403
+ return new ParsedEnvSpecStaticValue({ rawValue: text(), _location: location() });
404
+ }, "peg$f12");
405
+ var peg$f13 = /* @__PURE__ */ __name(function(leadingSpace, contents) {
406
+ return new ParsedEnvSpecDivider({
407
+ contents,
408
+ leadingSpace,
409
+ _location: location()
410
+ });
411
+ }, "peg$f13");
412
+ var peg$f14 = /* @__PURE__ */ __name(function() {
413
+ return new ParsedEnvSpecStaticValue({ rawValue: text(), _location: location() });
414
+ }, "peg$f14");
415
+ var peg$f15 = /* @__PURE__ */ __name(function() {
416
+ return new ParsedEnvSpecStaticValue({ rawValue: text(), _location: location() });
417
+ }, "peg$f15");
418
+ var peg$f16 = /* @__PURE__ */ __name(function(quote) {
419
+ return new ParsedEnvSpecStaticValue({ quote, rawValue: text(), _location: location() });
420
+ }, "peg$f16");
421
+ var peg$f17 = /* @__PURE__ */ __name(function(quote) {
422
+ return new ParsedEnvSpecStaticValue({ quote, rawValue: text(), _location: location() });
423
+ }, "peg$f17");
424
+ var peg$f18 = /* @__PURE__ */ __name(function(quote) {
425
+ return new ParsedEnvSpecStaticValue({ quote, rawValue: text(), _location: location() });
426
+ }, "peg$f18");
427
+ var peg$f19 = /* @__PURE__ */ __name(function(quote) {
428
+ return new ParsedEnvSpecStaticValue({ quote, isMultiLine: true, rawValue: text(), _location: location() });
429
+ }, "peg$f19");
430
+ var peg$f20 = /* @__PURE__ */ __name(function(quote) {
431
+ return new ParsedEnvSpecStaticValue({ quote, isMultiLine: true, rawValue: text(), _location: location() });
432
+ }, "peg$f20");
433
+ var peg$f21 = /* @__PURE__ */ __name(function(quote) {
434
+ return new ParsedEnvSpecStaticValue({ quote, isMultiLine: true, rawValue: text(), _location: location() });
435
+ }, "peg$f21");
436
+ var peg$f22 = /* @__PURE__ */ __name(function(quote) {
437
+ return new ParsedEnvSpecStaticValue({ quote, isMultiLine: true, rawValue: text(), _location: location() });
438
+ }, "peg$f22");
439
+ var peg$currPos = options.peg$currPos | 0;
440
+ var peg$savedPos = peg$currPos;
441
+ var peg$posDetailsCache = [{ line: 1, column: 1 }];
442
+ var peg$maxFailPos = peg$currPos;
443
+ var peg$maxFailExpected = options.peg$maxFailExpected || [];
444
+ var peg$silentFails = options.peg$silentFails | 0;
445
+ var peg$result;
446
+ if (options.startRule) {
447
+ if (!(options.startRule in peg$startRuleFunctions)) {
448
+ throw new Error(`Can't start parsing from rule "` + options.startRule + '".');
449
+ }
450
+ peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
451
+ }
452
+ function text() {
453
+ return input.substring(peg$savedPos, peg$currPos);
454
+ }
455
+ __name(text, "text");
456
+ function offset() {
457
+ return peg$savedPos;
458
+ }
459
+ __name(offset, "offset");
460
+ function range() {
461
+ return {
462
+ source: peg$source,
463
+ start: peg$savedPos,
464
+ end: peg$currPos
465
+ };
466
+ }
467
+ __name(range, "range");
468
+ function location() {
469
+ return peg$computeLocation(peg$savedPos, peg$currPos);
470
+ }
471
+ __name(location, "location");
472
+ function expected(description, location2) {
473
+ location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos);
474
+ throw peg$buildStructuredError(
475
+ [peg$otherExpectation(description)],
476
+ input.substring(peg$savedPos, peg$currPos),
477
+ location2
478
+ );
479
+ }
480
+ __name(expected, "expected");
481
+ function error(message, location2) {
482
+ location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos);
483
+ throw peg$buildSimpleError(message, location2);
484
+ }
485
+ __name(error, "error");
486
+ function peg$literalExpectation(text2, ignoreCase) {
487
+ return { type: "literal", text: text2, ignoreCase };
488
+ }
489
+ __name(peg$literalExpectation, "peg$literalExpectation");
490
+ function peg$classExpectation(parts, inverted, ignoreCase) {
491
+ return { type: "class", parts, inverted, ignoreCase };
492
+ }
493
+ __name(peg$classExpectation, "peg$classExpectation");
494
+ function peg$anyExpectation() {
495
+ return { type: "any" };
496
+ }
497
+ __name(peg$anyExpectation, "peg$anyExpectation");
498
+ function peg$endExpectation() {
499
+ return { type: "end" };
500
+ }
501
+ __name(peg$endExpectation, "peg$endExpectation");
502
+ function peg$otherExpectation(description) {
503
+ return { type: "other", description };
504
+ }
505
+ __name(peg$otherExpectation, "peg$otherExpectation");
506
+ function peg$computePosDetails(pos) {
507
+ var details = peg$posDetailsCache[pos];
508
+ var p;
509
+ if (details) {
510
+ return details;
511
+ } else {
512
+ if (pos >= peg$posDetailsCache.length) {
513
+ p = peg$posDetailsCache.length - 1;
514
+ } else {
515
+ p = pos;
516
+ while (!peg$posDetailsCache[--p]) {
517
+ }
518
+ }
519
+ details = peg$posDetailsCache[p];
520
+ details = {
521
+ line: details.line,
522
+ column: details.column
523
+ };
524
+ while (p < pos) {
525
+ if (input.charCodeAt(p) === 10) {
526
+ details.line++;
527
+ details.column = 1;
528
+ } else {
529
+ details.column++;
530
+ }
531
+ p++;
532
+ }
533
+ peg$posDetailsCache[pos] = details;
534
+ return details;
535
+ }
536
+ }
537
+ __name(peg$computePosDetails, "peg$computePosDetails");
538
+ function peg$computeLocation(startPos, endPos, offset2) {
539
+ var startPosDetails = peg$computePosDetails(startPos);
540
+ var endPosDetails = peg$computePosDetails(endPos);
541
+ var res = {
542
+ source: peg$source,
543
+ start: {
544
+ offset: startPos,
545
+ line: startPosDetails.line,
546
+ column: startPosDetails.column
547
+ },
548
+ end: {
549
+ offset: endPos,
550
+ line: endPosDetails.line,
551
+ column: endPosDetails.column
552
+ }
553
+ };
554
+ if (offset2 && peg$source && typeof peg$source.offset === "function") {
555
+ res.start = peg$source.offset(res.start);
556
+ res.end = peg$source.offset(res.end);
557
+ }
558
+ return res;
559
+ }
560
+ __name(peg$computeLocation, "peg$computeLocation");
561
+ function peg$fail(expected2) {
562
+ if (peg$currPos < peg$maxFailPos) {
563
+ return;
564
+ }
565
+ if (peg$currPos > peg$maxFailPos) {
566
+ peg$maxFailPos = peg$currPos;
567
+ peg$maxFailExpected = [];
568
+ }
569
+ peg$maxFailExpected.push(expected2);
570
+ }
571
+ __name(peg$fail, "peg$fail");
572
+ function peg$buildSimpleError(message, location2) {
573
+ return new peg$SyntaxError(message, null, null, location2);
574
+ }
575
+ __name(peg$buildSimpleError, "peg$buildSimpleError");
576
+ function peg$buildStructuredError(expected2, found, location2) {
577
+ return new peg$SyntaxError(
578
+ peg$SyntaxError.buildMessage(expected2, found),
579
+ expected2,
580
+ found,
581
+ location2
582
+ );
583
+ }
584
+ __name(peg$buildStructuredError, "peg$buildStructuredError");
585
+ function peg$parseEnvSpecFile() {
586
+ var s0, s1, s2, s3;
587
+ s0 = peg$currPos;
588
+ s1 = [];
589
+ s2 = peg$parseConfigItem();
590
+ if (s2 === peg$FAILED) {
591
+ s2 = peg$parseDivider();
592
+ if (s2 === peg$FAILED) {
593
+ s2 = peg$parseCommentBlock();
594
+ if (s2 === peg$FAILED) {
595
+ s2 = peg$currPos;
596
+ if (input.charCodeAt(peg$currPos) === 10) {
597
+ s3 = peg$c0;
598
+ peg$currPos++;
599
+ } else {
600
+ s3 = peg$FAILED;
601
+ if (peg$silentFails === 0) {
602
+ peg$fail(peg$e0);
603
+ }
604
+ }
605
+ if (s3 !== peg$FAILED) {
606
+ peg$savedPos = s2;
607
+ s3 = peg$f0();
608
+ }
609
+ s2 = s3;
610
+ }
611
+ }
612
+ }
613
+ while (s2 !== peg$FAILED) {
614
+ s1.push(s2);
615
+ s2 = peg$parseConfigItem();
616
+ if (s2 === peg$FAILED) {
617
+ s2 = peg$parseDivider();
618
+ if (s2 === peg$FAILED) {
619
+ s2 = peg$parseCommentBlock();
620
+ if (s2 === peg$FAILED) {
621
+ s2 = peg$currPos;
622
+ if (input.charCodeAt(peg$currPos) === 10) {
623
+ s3 = peg$c0;
624
+ peg$currPos++;
625
+ } else {
626
+ s3 = peg$FAILED;
627
+ if (peg$silentFails === 0) {
628
+ peg$fail(peg$e0);
629
+ }
630
+ }
631
+ if (s3 !== peg$FAILED) {
632
+ peg$savedPos = s2;
633
+ s3 = peg$f0();
634
+ }
635
+ s2 = s3;
636
+ }
637
+ }
638
+ }
639
+ }
640
+ peg$savedPos = s0;
641
+ s1 = peg$f1(s1);
642
+ s0 = s1;
643
+ return s0;
644
+ }
645
+ __name(peg$parseEnvSpecFile, "peg$parseEnvSpecFile");
646
+ function peg$parseConfigItem() {
647
+ var s0, s1, s2, s3, s4, s5, s6, s7, s9, s10;
648
+ s0 = peg$currPos;
649
+ s1 = [];
650
+ s2 = peg$currPos;
651
+ s3 = peg$parseIgnoredDecoratorComment();
652
+ if (s3 === peg$FAILED) {
653
+ s3 = peg$parseDecoratorComment();
654
+ if (s3 === peg$FAILED) {
655
+ s3 = peg$parseComment();
656
+ }
657
+ }
658
+ if (s3 !== peg$FAILED) {
659
+ if (input.charCodeAt(peg$currPos) === 10) {
660
+ s4 = peg$c0;
661
+ peg$currPos++;
662
+ } else {
663
+ s4 = peg$FAILED;
664
+ if (peg$silentFails === 0) {
665
+ peg$fail(peg$e0);
666
+ }
667
+ }
668
+ if (s4 !== peg$FAILED) {
669
+ s2 = s3;
670
+ } else {
671
+ peg$currPos = s2;
672
+ s2 = peg$FAILED;
673
+ }
674
+ } else {
675
+ peg$currPos = s2;
676
+ s2 = peg$FAILED;
677
+ }
678
+ while (s2 !== peg$FAILED) {
679
+ s1.push(s2);
680
+ s2 = peg$currPos;
681
+ s3 = peg$parseIgnoredDecoratorComment();
682
+ if (s3 === peg$FAILED) {
683
+ s3 = peg$parseDecoratorComment();
684
+ if (s3 === peg$FAILED) {
685
+ s3 = peg$parseComment();
686
+ }
687
+ }
688
+ if (s3 !== peg$FAILED) {
689
+ if (input.charCodeAt(peg$currPos) === 10) {
690
+ s4 = peg$c0;
691
+ peg$currPos++;
692
+ } else {
693
+ s4 = peg$FAILED;
694
+ if (peg$silentFails === 0) {
695
+ peg$fail(peg$e0);
696
+ }
697
+ }
698
+ if (s4 !== peg$FAILED) {
699
+ s2 = s3;
700
+ } else {
701
+ peg$currPos = s2;
702
+ s2 = peg$FAILED;
703
+ }
704
+ } else {
705
+ peg$currPos = s2;
706
+ s2 = peg$FAILED;
707
+ }
708
+ }
709
+ s2 = peg$currPos;
710
+ s3 = peg$parse_();
711
+ if (input.substr(peg$currPos, 7) === peg$c1) {
712
+ s4 = peg$c1;
713
+ peg$currPos += 7;
714
+ } else {
715
+ s4 = peg$FAILED;
716
+ if (peg$silentFails === 0) {
717
+ peg$fail(peg$e1);
718
+ }
719
+ }
720
+ if (s4 !== peg$FAILED) {
721
+ s5 = peg$parse_();
722
+ s3 = [s3, s4, s5];
723
+ s2 = s3;
724
+ } else {
725
+ peg$currPos = s2;
726
+ s2 = peg$FAILED;
727
+ }
728
+ if (s2 === peg$FAILED) {
729
+ s2 = null;
730
+ }
731
+ s3 = peg$parse_();
732
+ s4 = peg$parseConfigItemKey();
733
+ if (s4 !== peg$FAILED) {
734
+ s5 = peg$parse_();
735
+ if (input.charCodeAt(peg$currPos) === 61) {
736
+ s6 = peg$c2;
737
+ peg$currPos++;
738
+ } else {
739
+ s6 = peg$FAILED;
740
+ if (peg$silentFails === 0) {
741
+ peg$fail(peg$e2);
742
+ }
743
+ }
744
+ if (s6 !== peg$FAILED) {
745
+ s7 = peg$parseConfigItemValue();
746
+ if (s7 === peg$FAILED) {
747
+ s7 = null;
748
+ }
749
+ peg$parse_();
750
+ s9 = peg$currPos;
751
+ s10 = peg$parseIgnoredDecoratorComment();
752
+ if (s10 === peg$FAILED) {
753
+ s10 = peg$parseDecoratorComment();
754
+ if (s10 === peg$FAILED) {
755
+ s10 = peg$parseComment();
756
+ }
757
+ }
758
+ if (s10 !== peg$FAILED) {
759
+ s9 = s10;
760
+ } else {
761
+ peg$currPos = s9;
762
+ s9 = peg$FAILED;
763
+ }
764
+ if (s9 === peg$FAILED) {
765
+ s9 = null;
766
+ }
767
+ s10 = peg$parse_n();
768
+ if (s10 !== peg$FAILED) {
769
+ peg$savedPos = s0;
770
+ s0 = peg$f2(s1, s4, s7, s9);
771
+ } else {
772
+ peg$currPos = s0;
773
+ s0 = peg$FAILED;
774
+ }
775
+ } else {
776
+ peg$currPos = s0;
777
+ s0 = peg$FAILED;
778
+ }
779
+ } else {
780
+ peg$currPos = s0;
781
+ s0 = peg$FAILED;
782
+ }
783
+ return s0;
784
+ }
785
+ __name(peg$parseConfigItem, "peg$parseConfigItem");
786
+ function peg$parseConfigItemKey() {
787
+ var s0, s1, s2, s3, s4;
788
+ s0 = peg$currPos;
789
+ s1 = peg$currPos;
790
+ s2 = input.charAt(peg$currPos);
791
+ if (peg$r0.test(s2)) {
792
+ peg$currPos++;
793
+ } else {
794
+ s2 = peg$FAILED;
795
+ if (peg$silentFails === 0) {
796
+ peg$fail(peg$e3);
797
+ }
798
+ }
799
+ if (s2 !== peg$FAILED) {
800
+ s3 = [];
801
+ s4 = input.charAt(peg$currPos);
802
+ if (peg$r1.test(s4)) {
803
+ peg$currPos++;
804
+ } else {
805
+ s4 = peg$FAILED;
806
+ if (peg$silentFails === 0) {
807
+ peg$fail(peg$e4);
808
+ }
809
+ }
810
+ while (s4 !== peg$FAILED) {
811
+ s3.push(s4);
812
+ s4 = input.charAt(peg$currPos);
813
+ if (peg$r1.test(s4)) {
814
+ peg$currPos++;
815
+ } else {
816
+ s4 = peg$FAILED;
817
+ if (peg$silentFails === 0) {
818
+ peg$fail(peg$e4);
819
+ }
820
+ }
821
+ }
822
+ s2 = [s2, s3];
823
+ s1 = s2;
824
+ } else {
825
+ peg$currPos = s1;
826
+ s1 = peg$FAILED;
827
+ }
828
+ if (s1 !== peg$FAILED) {
829
+ s0 = input.substring(s0, peg$currPos);
830
+ } else {
831
+ s0 = s1;
832
+ }
833
+ return s0;
834
+ }
835
+ __name(peg$parseConfigItemKey, "peg$parseConfigItemKey");
836
+ function peg$parseConfigItemValue() {
837
+ var s0;
838
+ s0 = peg$parseFunctionCall();
839
+ if (s0 === peg$FAILED) {
840
+ s0 = peg$parsemultiLineString();
841
+ if (s0 === peg$FAILED) {
842
+ s0 = peg$parsequotedString();
843
+ if (s0 === peg$FAILED) {
844
+ s0 = peg$parseunquotedString();
845
+ }
846
+ }
847
+ }
848
+ return s0;
849
+ }
850
+ __name(peg$parseConfigItemValue, "peg$parseConfigItemValue");
851
+ function peg$parseCommentBlock() {
852
+ var s0, s1, s2, s3, s4;
853
+ s0 = peg$currPos;
854
+ s1 = [];
855
+ s2 = peg$currPos;
856
+ s3 = peg$parseIgnoredDecoratorComment();
857
+ if (s3 === peg$FAILED) {
858
+ s3 = peg$parseDecoratorComment();
859
+ if (s3 === peg$FAILED) {
860
+ s3 = peg$parseComment();
861
+ }
862
+ }
863
+ if (s3 !== peg$FAILED) {
864
+ s4 = peg$parse_n();
865
+ if (s4 !== peg$FAILED) {
866
+ s2 = s3;
867
+ } else {
868
+ peg$currPos = s2;
869
+ s2 = peg$FAILED;
870
+ }
871
+ } else {
872
+ peg$currPos = s2;
873
+ s2 = peg$FAILED;
874
+ }
875
+ if (s2 !== peg$FAILED) {
876
+ while (s2 !== peg$FAILED) {
877
+ s1.push(s2);
878
+ s2 = peg$currPos;
879
+ s3 = peg$parseIgnoredDecoratorComment();
880
+ if (s3 === peg$FAILED) {
881
+ s3 = peg$parseDecoratorComment();
882
+ if (s3 === peg$FAILED) {
883
+ s3 = peg$parseComment();
884
+ }
885
+ }
886
+ if (s3 !== peg$FAILED) {
887
+ s4 = peg$parse_n();
888
+ if (s4 !== peg$FAILED) {
889
+ s2 = s3;
890
+ } else {
891
+ peg$currPos = s2;
892
+ s2 = peg$FAILED;
893
+ }
894
+ } else {
895
+ peg$currPos = s2;
896
+ s2 = peg$FAILED;
897
+ }
898
+ }
899
+ } else {
900
+ s1 = peg$FAILED;
901
+ }
902
+ if (s1 !== peg$FAILED) {
903
+ s2 = peg$parseDivider();
904
+ if (s2 === peg$FAILED) {
905
+ s2 = peg$parse_n();
906
+ }
907
+ if (s2 !== peg$FAILED) {
908
+ peg$savedPos = s0;
909
+ s0 = peg$f3(s1, s2);
910
+ } else {
911
+ peg$currPos = s0;
912
+ s0 = peg$FAILED;
913
+ }
914
+ } else {
915
+ peg$currPos = s0;
916
+ s0 = peg$FAILED;
917
+ }
918
+ return s0;
919
+ }
920
+ __name(peg$parseCommentBlock, "peg$parseCommentBlock");
921
+ function peg$parseComment() {
922
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
923
+ s0 = peg$currPos;
924
+ s1 = peg$currPos;
925
+ peg$silentFails++;
926
+ s2 = peg$parseDivider();
927
+ peg$silentFails--;
928
+ if (s2 === peg$FAILED) {
929
+ s1 = void 0;
930
+ } else {
931
+ peg$currPos = s1;
932
+ s1 = peg$FAILED;
933
+ }
934
+ if (s1 !== peg$FAILED) {
935
+ if (input.charCodeAt(peg$currPos) === 35) {
936
+ s2 = peg$c3;
937
+ peg$currPos++;
938
+ } else {
939
+ s2 = peg$FAILED;
940
+ if (peg$silentFails === 0) {
941
+ peg$fail(peg$e5);
942
+ }
943
+ }
944
+ if (s2 !== peg$FAILED) {
945
+ s3 = peg$currPos;
946
+ s4 = peg$parse_();
947
+ s3 = input.substring(s3, peg$currPos);
948
+ s4 = peg$currPos;
949
+ s5 = peg$currPos;
950
+ s6 = peg$currPos;
951
+ s7 = peg$currPos;
952
+ peg$silentFails++;
953
+ if (input.charCodeAt(peg$currPos) === 64) {
954
+ s8 = peg$c4;
955
+ peg$currPos++;
956
+ } else {
957
+ s8 = peg$FAILED;
958
+ if (peg$silentFails === 0) {
959
+ peg$fail(peg$e6);
960
+ }
961
+ }
962
+ peg$silentFails--;
963
+ if (s8 === peg$FAILED) {
964
+ s7 = void 0;
965
+ } else {
966
+ peg$currPos = s7;
967
+ s7 = peg$FAILED;
968
+ }
969
+ if (s7 !== peg$FAILED) {
970
+ s8 = [];
971
+ s9 = input.charAt(peg$currPos);
972
+ if (peg$r2.test(s9)) {
973
+ peg$currPos++;
974
+ } else {
975
+ s9 = peg$FAILED;
976
+ if (peg$silentFails === 0) {
977
+ peg$fail(peg$e7);
978
+ }
979
+ }
980
+ while (s9 !== peg$FAILED) {
981
+ s8.push(s9);
982
+ s9 = input.charAt(peg$currPos);
983
+ if (peg$r2.test(s9)) {
984
+ peg$currPos++;
985
+ } else {
986
+ s9 = peg$FAILED;
987
+ if (peg$silentFails === 0) {
988
+ peg$fail(peg$e7);
989
+ }
990
+ }
991
+ }
992
+ s7 = [s7, s8];
993
+ s6 = s7;
994
+ } else {
995
+ peg$currPos = s6;
996
+ s6 = peg$FAILED;
997
+ }
998
+ if (s6 === peg$FAILED) {
999
+ s6 = null;
1000
+ }
1001
+ s5 = input.substring(s5, peg$currPos);
1002
+ s4 = input.substring(s4, peg$currPos);
1003
+ peg$savedPos = s0;
1004
+ s0 = peg$f4(s3, s4);
1005
+ } else {
1006
+ peg$currPos = s0;
1007
+ s0 = peg$FAILED;
1008
+ }
1009
+ } else {
1010
+ peg$currPos = s0;
1011
+ s0 = peg$FAILED;
1012
+ }
1013
+ return s0;
1014
+ }
1015
+ __name(peg$parseComment, "peg$parseComment");
1016
+ function peg$parseIgnoredDecoratorComment() {
1017
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
1018
+ s0 = peg$currPos;
1019
+ if (input.charCodeAt(peg$currPos) === 35) {
1020
+ s1 = peg$c3;
1021
+ peg$currPos++;
1022
+ } else {
1023
+ s1 = peg$FAILED;
1024
+ if (peg$silentFails === 0) {
1025
+ peg$fail(peg$e5);
1026
+ }
1027
+ }
1028
+ if (s1 !== peg$FAILED) {
1029
+ s2 = peg$currPos;
1030
+ s3 = peg$parse_();
1031
+ s2 = input.substring(s2, peg$currPos);
1032
+ s3 = peg$currPos;
1033
+ s4 = peg$currPos;
1034
+ if (input.charCodeAt(peg$currPos) === 64) {
1035
+ s5 = peg$c4;
1036
+ peg$currPos++;
1037
+ } else {
1038
+ s5 = peg$FAILED;
1039
+ if (peg$silentFails === 0) {
1040
+ peg$fail(peg$e6);
1041
+ }
1042
+ }
1043
+ if (s5 !== peg$FAILED) {
1044
+ s6 = [];
1045
+ s7 = input.charAt(peg$currPos);
1046
+ if (peg$r3.test(s7)) {
1047
+ peg$currPos++;
1048
+ } else {
1049
+ s7 = peg$FAILED;
1050
+ if (peg$silentFails === 0) {
1051
+ peg$fail(peg$e8);
1052
+ }
1053
+ }
1054
+ if (s7 !== peg$FAILED) {
1055
+ while (s7 !== peg$FAILED) {
1056
+ s6.push(s7);
1057
+ s7 = input.charAt(peg$currPos);
1058
+ if (peg$r3.test(s7)) {
1059
+ peg$currPos++;
1060
+ } else {
1061
+ s7 = peg$FAILED;
1062
+ if (peg$silentFails === 0) {
1063
+ peg$fail(peg$e8);
1064
+ }
1065
+ }
1066
+ }
1067
+ } else {
1068
+ s6 = peg$FAILED;
1069
+ }
1070
+ if (s6 !== peg$FAILED) {
1071
+ if (input.charCodeAt(peg$currPos) === 58) {
1072
+ s7 = peg$c5;
1073
+ peg$currPos++;
1074
+ } else {
1075
+ s7 = peg$FAILED;
1076
+ if (peg$silentFails === 0) {
1077
+ peg$fail(peg$e9);
1078
+ }
1079
+ }
1080
+ if (s7 !== peg$FAILED) {
1081
+ s8 = [];
1082
+ s9 = input.charAt(peg$currPos);
1083
+ if (peg$r2.test(s9)) {
1084
+ peg$currPos++;
1085
+ } else {
1086
+ s9 = peg$FAILED;
1087
+ if (peg$silentFails === 0) {
1088
+ peg$fail(peg$e7);
1089
+ }
1090
+ }
1091
+ while (s9 !== peg$FAILED) {
1092
+ s8.push(s9);
1093
+ s9 = input.charAt(peg$currPos);
1094
+ if (peg$r2.test(s9)) {
1095
+ peg$currPos++;
1096
+ } else {
1097
+ s9 = peg$FAILED;
1098
+ if (peg$silentFails === 0) {
1099
+ peg$fail(peg$e7);
1100
+ }
1101
+ }
1102
+ }
1103
+ s5 = [s5, s6, s7, s8];
1104
+ s4 = s5;
1105
+ } else {
1106
+ peg$currPos = s4;
1107
+ s4 = peg$FAILED;
1108
+ }
1109
+ } else {
1110
+ peg$currPos = s4;
1111
+ s4 = peg$FAILED;
1112
+ }
1113
+ } else {
1114
+ peg$currPos = s4;
1115
+ s4 = peg$FAILED;
1116
+ }
1117
+ if (s4 === peg$FAILED) {
1118
+ s4 = peg$currPos;
1119
+ if (input.charCodeAt(peg$currPos) === 64) {
1120
+ s5 = peg$c4;
1121
+ peg$currPos++;
1122
+ } else {
1123
+ s5 = peg$FAILED;
1124
+ if (peg$silentFails === 0) {
1125
+ peg$fail(peg$e6);
1126
+ }
1127
+ }
1128
+ if (s5 !== peg$FAILED) {
1129
+ s6 = [];
1130
+ s7 = input.charAt(peg$currPos);
1131
+ if (peg$r3.test(s7)) {
1132
+ peg$currPos++;
1133
+ } else {
1134
+ s7 = peg$FAILED;
1135
+ if (peg$silentFails === 0) {
1136
+ peg$fail(peg$e8);
1137
+ }
1138
+ }
1139
+ if (s7 !== peg$FAILED) {
1140
+ while (s7 !== peg$FAILED) {
1141
+ s6.push(s7);
1142
+ s7 = input.charAt(peg$currPos);
1143
+ if (peg$r3.test(s7)) {
1144
+ peg$currPos++;
1145
+ } else {
1146
+ s7 = peg$FAILED;
1147
+ if (peg$silentFails === 0) {
1148
+ peg$fail(peg$e8);
1149
+ }
1150
+ }
1151
+ }
1152
+ } else {
1153
+ s6 = peg$FAILED;
1154
+ }
1155
+ if (s6 !== peg$FAILED) {
1156
+ s7 = peg$parse__();
1157
+ if (s7 !== peg$FAILED) {
1158
+ s8 = peg$currPos;
1159
+ peg$silentFails++;
1160
+ s9 = input.charAt(peg$currPos);
1161
+ if (peg$r4.test(s9)) {
1162
+ peg$currPos++;
1163
+ } else {
1164
+ s9 = peg$FAILED;
1165
+ if (peg$silentFails === 0) {
1166
+ peg$fail(peg$e10);
1167
+ }
1168
+ }
1169
+ peg$silentFails--;
1170
+ if (s9 === peg$FAILED) {
1171
+ s8 = void 0;
1172
+ } else {
1173
+ peg$currPos = s8;
1174
+ s8 = peg$FAILED;
1175
+ }
1176
+ if (s8 !== peg$FAILED) {
1177
+ s9 = [];
1178
+ s10 = input.charAt(peg$currPos);
1179
+ if (peg$r2.test(s10)) {
1180
+ peg$currPos++;
1181
+ } else {
1182
+ s10 = peg$FAILED;
1183
+ if (peg$silentFails === 0) {
1184
+ peg$fail(peg$e7);
1185
+ }
1186
+ }
1187
+ while (s10 !== peg$FAILED) {
1188
+ s9.push(s10);
1189
+ s10 = input.charAt(peg$currPos);
1190
+ if (peg$r2.test(s10)) {
1191
+ peg$currPos++;
1192
+ } else {
1193
+ s10 = peg$FAILED;
1194
+ if (peg$silentFails === 0) {
1195
+ peg$fail(peg$e7);
1196
+ }
1197
+ }
1198
+ }
1199
+ s5 = [s5, s6, s7, s8, s9];
1200
+ s4 = s5;
1201
+ } else {
1202
+ peg$currPos = s4;
1203
+ s4 = peg$FAILED;
1204
+ }
1205
+ } else {
1206
+ peg$currPos = s4;
1207
+ s4 = peg$FAILED;
1208
+ }
1209
+ } else {
1210
+ peg$currPos = s4;
1211
+ s4 = peg$FAILED;
1212
+ }
1213
+ } else {
1214
+ peg$currPos = s4;
1215
+ s4 = peg$FAILED;
1216
+ }
1217
+ }
1218
+ if (s4 !== peg$FAILED) {
1219
+ s3 = input.substring(s3, peg$currPos);
1220
+ } else {
1221
+ s3 = s4;
1222
+ }
1223
+ if (s3 !== peg$FAILED) {
1224
+ peg$savedPos = s0;
1225
+ s0 = peg$f5(s2, s3);
1226
+ } else {
1227
+ peg$currPos = s0;
1228
+ s0 = peg$FAILED;
1229
+ }
1230
+ } else {
1231
+ peg$currPos = s0;
1232
+ s0 = peg$FAILED;
1233
+ }
1234
+ return s0;
1235
+ }
1236
+ __name(peg$parseIgnoredDecoratorComment, "peg$parseIgnoredDecoratorComment");
1237
+ function peg$parseDecoratorComment() {
1238
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
1239
+ s0 = peg$currPos;
1240
+ if (input.charCodeAt(peg$currPos) === 35) {
1241
+ s1 = peg$c3;
1242
+ peg$currPos++;
1243
+ } else {
1244
+ s1 = peg$FAILED;
1245
+ if (peg$silentFails === 0) {
1246
+ peg$fail(peg$e5);
1247
+ }
1248
+ }
1249
+ if (s1 !== peg$FAILED) {
1250
+ s2 = peg$currPos;
1251
+ s3 = peg$parse_();
1252
+ s2 = input.substring(s2, peg$currPos);
1253
+ s3 = peg$parseDecorator();
1254
+ if (s3 !== peg$FAILED) {
1255
+ s4 = [];
1256
+ s5 = peg$currPos;
1257
+ s6 = peg$parse__();
1258
+ if (s6 !== peg$FAILED) {
1259
+ s7 = peg$parseDecorator();
1260
+ if (s7 !== peg$FAILED) {
1261
+ s5 = s7;
1262
+ } else {
1263
+ peg$currPos = s5;
1264
+ s5 = peg$FAILED;
1265
+ }
1266
+ } else {
1267
+ peg$currPos = s5;
1268
+ s5 = peg$FAILED;
1269
+ }
1270
+ while (s5 !== peg$FAILED) {
1271
+ s4.push(s5);
1272
+ s5 = peg$currPos;
1273
+ s6 = peg$parse__();
1274
+ if (s6 !== peg$FAILED) {
1275
+ s7 = peg$parseDecorator();
1276
+ if (s7 !== peg$FAILED) {
1277
+ s5 = s7;
1278
+ } else {
1279
+ peg$currPos = s5;
1280
+ s5 = peg$FAILED;
1281
+ }
1282
+ } else {
1283
+ peg$currPos = s5;
1284
+ s5 = peg$FAILED;
1285
+ }
1286
+ }
1287
+ s5 = peg$parse_();
1288
+ s6 = peg$currPos;
1289
+ s7 = peg$currPos;
1290
+ if (input.charCodeAt(peg$currPos) === 35) {
1291
+ s8 = peg$c3;
1292
+ peg$currPos++;
1293
+ } else {
1294
+ s8 = peg$FAILED;
1295
+ if (peg$silentFails === 0) {
1296
+ peg$fail(peg$e5);
1297
+ }
1298
+ }
1299
+ if (s8 !== peg$FAILED) {
1300
+ s9 = [];
1301
+ s10 = input.charAt(peg$currPos);
1302
+ if (peg$r2.test(s10)) {
1303
+ peg$currPos++;
1304
+ } else {
1305
+ s10 = peg$FAILED;
1306
+ if (peg$silentFails === 0) {
1307
+ peg$fail(peg$e7);
1308
+ }
1309
+ }
1310
+ while (s10 !== peg$FAILED) {
1311
+ s9.push(s10);
1312
+ s10 = input.charAt(peg$currPos);
1313
+ if (peg$r2.test(s10)) {
1314
+ peg$currPos++;
1315
+ } else {
1316
+ s10 = peg$FAILED;
1317
+ if (peg$silentFails === 0) {
1318
+ peg$fail(peg$e7);
1319
+ }
1320
+ }
1321
+ }
1322
+ s8 = [s8, s9];
1323
+ s7 = s8;
1324
+ } else {
1325
+ peg$currPos = s7;
1326
+ s7 = peg$FAILED;
1327
+ }
1328
+ if (s7 === peg$FAILED) {
1329
+ s7 = null;
1330
+ }
1331
+ s6 = input.substring(s6, peg$currPos);
1332
+ peg$savedPos = s0;
1333
+ s0 = peg$f6(s2, s3, s4, s6);
1334
+ } else {
1335
+ peg$currPos = s0;
1336
+ s0 = peg$FAILED;
1337
+ }
1338
+ } else {
1339
+ peg$currPos = s0;
1340
+ s0 = peg$FAILED;
1341
+ }
1342
+ return s0;
1343
+ }
1344
+ __name(peg$parseDecoratorComment, "peg$parseDecoratorComment");
1345
+ function peg$parseDecorator() {
1346
+ var s0, s1, s2, s3, s4, s5, s6;
1347
+ s0 = peg$currPos;
1348
+ if (input.charCodeAt(peg$currPos) === 64) {
1349
+ s1 = peg$c4;
1350
+ peg$currPos++;
1351
+ } else {
1352
+ s1 = peg$FAILED;
1353
+ if (peg$silentFails === 0) {
1354
+ peg$fail(peg$e6);
1355
+ }
1356
+ }
1357
+ if (s1 !== peg$FAILED) {
1358
+ s2 = peg$parseDecoratorName();
1359
+ if (s2 !== peg$FAILED) {
1360
+ s3 = peg$currPos;
1361
+ if (input.substr(peg$currPos, 2) === peg$c6) {
1362
+ s4 = peg$c6;
1363
+ peg$currPos += 2;
1364
+ } else {
1365
+ s4 = peg$FAILED;
1366
+ if (peg$silentFails === 0) {
1367
+ peg$fail(peg$e11);
1368
+ }
1369
+ }
1370
+ if (s4 !== peg$FAILED) {
1371
+ peg$savedPos = s3;
1372
+ s4 = peg$f7(s2);
1373
+ }
1374
+ s3 = s4;
1375
+ if (s3 === peg$FAILED) {
1376
+ s3 = peg$currPos;
1377
+ if (input.charCodeAt(peg$currPos) === 40) {
1378
+ s4 = peg$c7;
1379
+ peg$currPos++;
1380
+ } else {
1381
+ s4 = peg$FAILED;
1382
+ if (peg$silentFails === 0) {
1383
+ peg$fail(peg$e12);
1384
+ }
1385
+ }
1386
+ if (s4 !== peg$FAILED) {
1387
+ s5 = peg$parseFunctionArgs();
1388
+ if (s5 === peg$FAILED) {
1389
+ s5 = null;
1390
+ }
1391
+ if (input.charCodeAt(peg$currPos) === 41) {
1392
+ s6 = peg$c8;
1393
+ peg$currPos++;
1394
+ } else {
1395
+ s6 = peg$FAILED;
1396
+ if (peg$silentFails === 0) {
1397
+ peg$fail(peg$e13);
1398
+ }
1399
+ }
1400
+ if (s6 !== peg$FAILED) {
1401
+ s3 = s5;
1402
+ } else {
1403
+ peg$currPos = s3;
1404
+ s3 = peg$FAILED;
1405
+ }
1406
+ } else {
1407
+ peg$currPos = s3;
1408
+ s3 = peg$FAILED;
1409
+ }
1410
+ if (s3 === peg$FAILED) {
1411
+ s3 = peg$currPos;
1412
+ if (input.charCodeAt(peg$currPos) === 61) {
1413
+ s4 = peg$c2;
1414
+ peg$currPos++;
1415
+ } else {
1416
+ s4 = peg$FAILED;
1417
+ if (peg$silentFails === 0) {
1418
+ peg$fail(peg$e2);
1419
+ }
1420
+ }
1421
+ if (s4 !== peg$FAILED) {
1422
+ s5 = peg$parseDecoratorValue();
1423
+ if (s5 !== peg$FAILED) {
1424
+ s3 = s5;
1425
+ } else {
1426
+ peg$currPos = s3;
1427
+ s3 = peg$FAILED;
1428
+ }
1429
+ } else {
1430
+ peg$currPos = s3;
1431
+ s3 = peg$FAILED;
1432
+ }
1433
+ }
1434
+ }
1435
+ if (s3 === peg$FAILED) {
1436
+ s3 = null;
1437
+ }
1438
+ peg$savedPos = s0;
1439
+ s0 = peg$f8(s2, s3);
1440
+ } else {
1441
+ peg$currPos = s0;
1442
+ s0 = peg$FAILED;
1443
+ }
1444
+ } else {
1445
+ peg$currPos = s0;
1446
+ s0 = peg$FAILED;
1447
+ }
1448
+ return s0;
1449
+ }
1450
+ __name(peg$parseDecorator, "peg$parseDecorator");
1451
+ function peg$parseDecoratorName() {
1452
+ var s0, s1, s2, s3, s4;
1453
+ s0 = peg$currPos;
1454
+ s1 = peg$currPos;
1455
+ s2 = input.charAt(peg$currPos);
1456
+ if (peg$r3.test(s2)) {
1457
+ peg$currPos++;
1458
+ } else {
1459
+ s2 = peg$FAILED;
1460
+ if (peg$silentFails === 0) {
1461
+ peg$fail(peg$e8);
1462
+ }
1463
+ }
1464
+ if (s2 !== peg$FAILED) {
1465
+ s3 = [];
1466
+ s4 = input.charAt(peg$currPos);
1467
+ if (peg$r5.test(s4)) {
1468
+ peg$currPos++;
1469
+ } else {
1470
+ s4 = peg$FAILED;
1471
+ if (peg$silentFails === 0) {
1472
+ peg$fail(peg$e14);
1473
+ }
1474
+ }
1475
+ while (s4 !== peg$FAILED) {
1476
+ s3.push(s4);
1477
+ s4 = input.charAt(peg$currPos);
1478
+ if (peg$r5.test(s4)) {
1479
+ peg$currPos++;
1480
+ } else {
1481
+ s4 = peg$FAILED;
1482
+ if (peg$silentFails === 0) {
1483
+ peg$fail(peg$e14);
1484
+ }
1485
+ }
1486
+ }
1487
+ s2 = [s2, s3];
1488
+ s1 = s2;
1489
+ } else {
1490
+ peg$currPos = s1;
1491
+ s1 = peg$FAILED;
1492
+ }
1493
+ if (s1 !== peg$FAILED) {
1494
+ s0 = input.substring(s0, peg$currPos);
1495
+ } else {
1496
+ s0 = s1;
1497
+ }
1498
+ return s0;
1499
+ }
1500
+ __name(peg$parseDecoratorName, "peg$parseDecoratorName");
1501
+ function peg$parseDecoratorValue() {
1502
+ var s0;
1503
+ s0 = peg$parseFunctionCall();
1504
+ if (s0 === peg$FAILED) {
1505
+ s0 = peg$parsequotedString();
1506
+ if (s0 === peg$FAILED) {
1507
+ s0 = peg$parseunquotedStringWithoutSpaces();
1508
+ }
1509
+ }
1510
+ return s0;
1511
+ }
1512
+ __name(peg$parseDecoratorValue, "peg$parseDecoratorValue");
1513
+ function peg$parseFunctionCall() {
1514
+ var s0, s1, s2, s4, s6;
1515
+ s0 = peg$currPos;
1516
+ s1 = peg$parseFunctionName();
1517
+ if (s1 !== peg$FAILED) {
1518
+ if (input.charCodeAt(peg$currPos) === 40) {
1519
+ s2 = peg$c7;
1520
+ peg$currPos++;
1521
+ } else {
1522
+ s2 = peg$FAILED;
1523
+ if (peg$silentFails === 0) {
1524
+ peg$fail(peg$e12);
1525
+ }
1526
+ }
1527
+ if (s2 !== peg$FAILED) {
1528
+ peg$parse_();
1529
+ s4 = peg$parseFunctionArgs();
1530
+ if (s4 === peg$FAILED) {
1531
+ s4 = null;
1532
+ }
1533
+ peg$parse_();
1534
+ if (input.charCodeAt(peg$currPos) === 41) {
1535
+ s6 = peg$c8;
1536
+ peg$currPos++;
1537
+ } else {
1538
+ s6 = peg$FAILED;
1539
+ if (peg$silentFails === 0) {
1540
+ peg$fail(peg$e13);
1541
+ }
1542
+ }
1543
+ if (s6 !== peg$FAILED) {
1544
+ peg$savedPos = s0;
1545
+ s0 = peg$f9(s1, s4);
1546
+ } else {
1547
+ peg$currPos = s0;
1548
+ s0 = peg$FAILED;
1549
+ }
1550
+ } else {
1551
+ peg$currPos = s0;
1552
+ s0 = peg$FAILED;
1553
+ }
1554
+ } else {
1555
+ peg$currPos = s0;
1556
+ s0 = peg$FAILED;
1557
+ }
1558
+ return s0;
1559
+ }
1560
+ __name(peg$parseFunctionCall, "peg$parseFunctionCall");
1561
+ function peg$parseFunctionName() {
1562
+ var s0, s1, s2, s3, s4;
1563
+ s0 = peg$currPos;
1564
+ s1 = peg$currPos;
1565
+ s2 = input.charAt(peg$currPos);
1566
+ if (peg$r3.test(s2)) {
1567
+ peg$currPos++;
1568
+ } else {
1569
+ s2 = peg$FAILED;
1570
+ if (peg$silentFails === 0) {
1571
+ peg$fail(peg$e8);
1572
+ }
1573
+ }
1574
+ if (s2 !== peg$FAILED) {
1575
+ s3 = [];
1576
+ s4 = input.charAt(peg$currPos);
1577
+ if (peg$r5.test(s4)) {
1578
+ peg$currPos++;
1579
+ } else {
1580
+ s4 = peg$FAILED;
1581
+ if (peg$silentFails === 0) {
1582
+ peg$fail(peg$e14);
1583
+ }
1584
+ }
1585
+ while (s4 !== peg$FAILED) {
1586
+ s3.push(s4);
1587
+ s4 = input.charAt(peg$currPos);
1588
+ if (peg$r5.test(s4)) {
1589
+ peg$currPos++;
1590
+ } else {
1591
+ s4 = peg$FAILED;
1592
+ if (peg$silentFails === 0) {
1593
+ peg$fail(peg$e14);
1594
+ }
1595
+ }
1596
+ }
1597
+ s2 = [s2, s3];
1598
+ s1 = s2;
1599
+ } else {
1600
+ peg$currPos = s1;
1601
+ s1 = peg$FAILED;
1602
+ }
1603
+ if (s1 !== peg$FAILED) {
1604
+ s0 = input.substring(s0, peg$currPos);
1605
+ } else {
1606
+ s0 = s1;
1607
+ }
1608
+ return s0;
1609
+ }
1610
+ __name(peg$parseFunctionName, "peg$parseFunctionName");
1611
+ function peg$parseFunctionArgs() {
1612
+ var s0, s1, s2, s3, s4, s5, s6, s7;
1613
+ s0 = peg$currPos;
1614
+ s1 = peg$currPos;
1615
+ s2 = [];
1616
+ s3 = peg$currPos;
1617
+ s4 = peg$parseFunctionArgKeyName();
1618
+ if (s4 !== peg$FAILED) {
1619
+ if (input.charCodeAt(peg$currPos) === 61) {
1620
+ s5 = peg$c2;
1621
+ peg$currPos++;
1622
+ } else {
1623
+ s5 = peg$FAILED;
1624
+ if (peg$silentFails === 0) {
1625
+ peg$fail(peg$e2);
1626
+ }
1627
+ }
1628
+ if (s5 !== peg$FAILED) {
1629
+ s6 = peg$parseFunctionArgValue();
1630
+ if (s6 !== peg$FAILED) {
1631
+ peg$savedPos = s3;
1632
+ s3 = peg$f10(s4, s6);
1633
+ } else {
1634
+ peg$currPos = s3;
1635
+ s3 = peg$FAILED;
1636
+ }
1637
+ } else {
1638
+ peg$currPos = s3;
1639
+ s3 = peg$FAILED;
1640
+ }
1641
+ } else {
1642
+ peg$currPos = s3;
1643
+ s3 = peg$FAILED;
1644
+ }
1645
+ while (s3 !== peg$FAILED) {
1646
+ s2.push(s3);
1647
+ s3 = peg$currPos;
1648
+ s4 = peg$currPos;
1649
+ s5 = peg$parse_();
1650
+ if (input.charCodeAt(peg$currPos) === 44) {
1651
+ s6 = peg$c9;
1652
+ peg$currPos++;
1653
+ } else {
1654
+ s6 = peg$FAILED;
1655
+ if (peg$silentFails === 0) {
1656
+ peg$fail(peg$e15);
1657
+ }
1658
+ }
1659
+ if (s6 !== peg$FAILED) {
1660
+ s7 = peg$parse_();
1661
+ s5 = [s5, s6, s7];
1662
+ s4 = s5;
1663
+ } else {
1664
+ peg$currPos = s4;
1665
+ s4 = peg$FAILED;
1666
+ }
1667
+ if (s4 !== peg$FAILED) {
1668
+ s4 = peg$currPos;
1669
+ s5 = peg$parseFunctionArgKeyName();
1670
+ if (s5 !== peg$FAILED) {
1671
+ if (input.charCodeAt(peg$currPos) === 61) {
1672
+ s6 = peg$c2;
1673
+ peg$currPos++;
1674
+ } else {
1675
+ s6 = peg$FAILED;
1676
+ if (peg$silentFails === 0) {
1677
+ peg$fail(peg$e2);
1678
+ }
1679
+ }
1680
+ if (s6 !== peg$FAILED) {
1681
+ s7 = peg$parseFunctionArgValue();
1682
+ if (s7 !== peg$FAILED) {
1683
+ peg$savedPos = s4;
1684
+ s4 = peg$f10(s5, s7);
1685
+ } else {
1686
+ peg$currPos = s4;
1687
+ s4 = peg$FAILED;
1688
+ }
1689
+ } else {
1690
+ peg$currPos = s4;
1691
+ s4 = peg$FAILED;
1692
+ }
1693
+ } else {
1694
+ peg$currPos = s4;
1695
+ s4 = peg$FAILED;
1696
+ }
1697
+ if (s4 === peg$FAILED) {
1698
+ peg$currPos = s3;
1699
+ s3 = peg$FAILED;
1700
+ } else {
1701
+ s3 = s4;
1702
+ }
1703
+ } else {
1704
+ s3 = s4;
1705
+ }
1706
+ }
1707
+ if (s2.length < 1) {
1708
+ peg$currPos = s1;
1709
+ s1 = peg$FAILED;
1710
+ } else {
1711
+ s1 = s2;
1712
+ }
1713
+ if (s1 === peg$FAILED) {
1714
+ s1 = peg$currPos;
1715
+ s2 = [];
1716
+ s3 = peg$parseFunctionArgValue();
1717
+ while (s3 !== peg$FAILED) {
1718
+ s2.push(s3);
1719
+ s3 = peg$currPos;
1720
+ s4 = peg$currPos;
1721
+ s5 = peg$parse_();
1722
+ if (input.charCodeAt(peg$currPos) === 44) {
1723
+ s6 = peg$c9;
1724
+ peg$currPos++;
1725
+ } else {
1726
+ s6 = peg$FAILED;
1727
+ if (peg$silentFails === 0) {
1728
+ peg$fail(peg$e15);
1729
+ }
1730
+ }
1731
+ if (s6 !== peg$FAILED) {
1732
+ s7 = peg$parse_();
1733
+ s5 = [s5, s6, s7];
1734
+ s4 = s5;
1735
+ } else {
1736
+ peg$currPos = s4;
1737
+ s4 = peg$FAILED;
1738
+ }
1739
+ if (s4 !== peg$FAILED) {
1740
+ s4 = peg$parseFunctionArgValue();
1741
+ if (s4 === peg$FAILED) {
1742
+ peg$currPos = s3;
1743
+ s3 = peg$FAILED;
1744
+ } else {
1745
+ s3 = s4;
1746
+ }
1747
+ } else {
1748
+ s3 = s4;
1749
+ }
1750
+ }
1751
+ if (s2.length < 1) {
1752
+ peg$currPos = s1;
1753
+ s1 = peg$FAILED;
1754
+ } else {
1755
+ s1 = s2;
1756
+ }
1757
+ }
1758
+ if (s1 !== peg$FAILED) {
1759
+ peg$savedPos = s0;
1760
+ s1 = peg$f11(s1);
1761
+ }
1762
+ s0 = s1;
1763
+ return s0;
1764
+ }
1765
+ __name(peg$parseFunctionArgs, "peg$parseFunctionArgs");
1766
+ function peg$parseFunctionArgKeyName() {
1767
+ var s0, s1, s2, s3, s4;
1768
+ s0 = peg$currPos;
1769
+ s1 = peg$currPos;
1770
+ s2 = input.charAt(peg$currPos);
1771
+ if (peg$r3.test(s2)) {
1772
+ peg$currPos++;
1773
+ } else {
1774
+ s2 = peg$FAILED;
1775
+ if (peg$silentFails === 0) {
1776
+ peg$fail(peg$e8);
1777
+ }
1778
+ }
1779
+ if (s2 !== peg$FAILED) {
1780
+ s3 = [];
1781
+ s4 = input.charAt(peg$currPos);
1782
+ if (peg$r5.test(s4)) {
1783
+ peg$currPos++;
1784
+ } else {
1785
+ s4 = peg$FAILED;
1786
+ if (peg$silentFails === 0) {
1787
+ peg$fail(peg$e14);
1788
+ }
1789
+ }
1790
+ while (s4 !== peg$FAILED) {
1791
+ s3.push(s4);
1792
+ s4 = input.charAt(peg$currPos);
1793
+ if (peg$r5.test(s4)) {
1794
+ peg$currPos++;
1795
+ } else {
1796
+ s4 = peg$FAILED;
1797
+ if (peg$silentFails === 0) {
1798
+ peg$fail(peg$e14);
1799
+ }
1800
+ }
1801
+ }
1802
+ s2 = [s2, s3];
1803
+ s1 = s2;
1804
+ } else {
1805
+ peg$currPos = s1;
1806
+ s1 = peg$FAILED;
1807
+ }
1808
+ if (s1 !== peg$FAILED) {
1809
+ s0 = input.substring(s0, peg$currPos);
1810
+ } else {
1811
+ s0 = s1;
1812
+ }
1813
+ return s0;
1814
+ }
1815
+ __name(peg$parseFunctionArgKeyName, "peg$parseFunctionArgKeyName");
1816
+ function peg$parseFunctionArgValue() {
1817
+ var s0, s1, s2, s3;
1818
+ s0 = peg$parseFunctionCall();
1819
+ if (s0 === peg$FAILED) {
1820
+ s0 = peg$parsequotedString();
1821
+ if (s0 === peg$FAILED) {
1822
+ s0 = peg$currPos;
1823
+ s1 = peg$currPos;
1824
+ s2 = [];
1825
+ s3 = input.charAt(peg$currPos);
1826
+ if (peg$r6.test(s3)) {
1827
+ peg$currPos++;
1828
+ } else {
1829
+ s3 = peg$FAILED;
1830
+ if (peg$silentFails === 0) {
1831
+ peg$fail(peg$e16);
1832
+ }
1833
+ }
1834
+ if (s3 !== peg$FAILED) {
1835
+ while (s3 !== peg$FAILED) {
1836
+ s2.push(s3);
1837
+ s3 = input.charAt(peg$currPos);
1838
+ if (peg$r6.test(s3)) {
1839
+ peg$currPos++;
1840
+ } else {
1841
+ s3 = peg$FAILED;
1842
+ if (peg$silentFails === 0) {
1843
+ peg$fail(peg$e16);
1844
+ }
1845
+ }
1846
+ }
1847
+ } else {
1848
+ s2 = peg$FAILED;
1849
+ }
1850
+ if (s2 !== peg$FAILED) {
1851
+ s1 = input.substring(s1, peg$currPos);
1852
+ } else {
1853
+ s1 = s2;
1854
+ }
1855
+ if (s1 !== peg$FAILED) {
1856
+ peg$savedPos = s0;
1857
+ s1 = peg$f12();
1858
+ }
1859
+ s0 = s1;
1860
+ }
1861
+ }
1862
+ return s0;
1863
+ }
1864
+ __name(peg$parseFunctionArgValue, "peg$parseFunctionArgValue");
1865
+ function peg$parseDivider() {
1866
+ var s0, s1, s2, s3, s4, s5, s6, s7;
1867
+ s0 = peg$currPos;
1868
+ if (input.charCodeAt(peg$currPos) === 35) {
1869
+ s1 = peg$c3;
1870
+ peg$currPos++;
1871
+ } else {
1872
+ s1 = peg$FAILED;
1873
+ if (peg$silentFails === 0) {
1874
+ peg$fail(peg$e5);
1875
+ }
1876
+ }
1877
+ if (s1 !== peg$FAILED) {
1878
+ s2 = peg$currPos;
1879
+ s3 = peg$parse_();
1880
+ s2 = input.substring(s2, peg$currPos);
1881
+ s3 = peg$currPos;
1882
+ s4 = peg$currPos;
1883
+ s5 = peg$currPos;
1884
+ s6 = [];
1885
+ s7 = input.charAt(peg$currPos);
1886
+ if (peg$r7.test(s7)) {
1887
+ peg$currPos++;
1888
+ } else {
1889
+ s7 = peg$FAILED;
1890
+ if (peg$silentFails === 0) {
1891
+ peg$fail(peg$e17);
1892
+ }
1893
+ }
1894
+ while (s7 !== peg$FAILED) {
1895
+ s6.push(s7);
1896
+ s7 = input.charAt(peg$currPos);
1897
+ if (peg$r7.test(s7)) {
1898
+ peg$currPos++;
1899
+ } else {
1900
+ s7 = peg$FAILED;
1901
+ if (peg$silentFails === 0) {
1902
+ peg$fail(peg$e17);
1903
+ }
1904
+ }
1905
+ }
1906
+ if (s6.length < 3) {
1907
+ peg$currPos = s5;
1908
+ s5 = peg$FAILED;
1909
+ } else {
1910
+ s5 = s6;
1911
+ }
1912
+ if (s5 !== peg$FAILED) {
1913
+ s6 = [];
1914
+ s7 = input.charAt(peg$currPos);
1915
+ if (peg$r2.test(s7)) {
1916
+ peg$currPos++;
1917
+ } else {
1918
+ s7 = peg$FAILED;
1919
+ if (peg$silentFails === 0) {
1920
+ peg$fail(peg$e7);
1921
+ }
1922
+ }
1923
+ while (s7 !== peg$FAILED) {
1924
+ s6.push(s7);
1925
+ s7 = input.charAt(peg$currPos);
1926
+ if (peg$r2.test(s7)) {
1927
+ peg$currPos++;
1928
+ } else {
1929
+ s7 = peg$FAILED;
1930
+ if (peg$silentFails === 0) {
1931
+ peg$fail(peg$e7);
1932
+ }
1933
+ }
1934
+ }
1935
+ s5 = [s5, s6];
1936
+ s4 = s5;
1937
+ } else {
1938
+ peg$currPos = s4;
1939
+ s4 = peg$FAILED;
1940
+ }
1941
+ if (s4 !== peg$FAILED) {
1942
+ s3 = input.substring(s3, peg$currPos);
1943
+ } else {
1944
+ s3 = s4;
1945
+ }
1946
+ if (s3 !== peg$FAILED) {
1947
+ s4 = peg$parse_n();
1948
+ if (s4 !== peg$FAILED) {
1949
+ peg$savedPos = s0;
1950
+ s0 = peg$f13(s2, s3);
1951
+ } else {
1952
+ peg$currPos = s0;
1953
+ s0 = peg$FAILED;
1954
+ }
1955
+ } else {
1956
+ peg$currPos = s0;
1957
+ s0 = peg$FAILED;
1958
+ }
1959
+ } else {
1960
+ peg$currPos = s0;
1961
+ s0 = peg$FAILED;
1962
+ }
1963
+ return s0;
1964
+ }
1965
+ __name(peg$parseDivider, "peg$parseDivider");
1966
+ function peg$parseunquotedString() {
1967
+ var s0, s1, s2, s3, s4, s5, s6;
1968
+ s0 = peg$currPos;
1969
+ s1 = peg$currPos;
1970
+ s2 = peg$currPos;
1971
+ s3 = peg$parse_();
1972
+ s4 = peg$currPos;
1973
+ peg$silentFails++;
1974
+ s5 = input.charAt(peg$currPos);
1975
+ if (peg$r8.test(s5)) {
1976
+ peg$currPos++;
1977
+ } else {
1978
+ s5 = peg$FAILED;
1979
+ if (peg$silentFails === 0) {
1980
+ peg$fail(peg$e18);
1981
+ }
1982
+ }
1983
+ peg$silentFails--;
1984
+ if (s5 === peg$FAILED) {
1985
+ s4 = void 0;
1986
+ } else {
1987
+ peg$currPos = s4;
1988
+ s4 = peg$FAILED;
1989
+ }
1990
+ if (s4 !== peg$FAILED) {
1991
+ s5 = [];
1992
+ s6 = input.charAt(peg$currPos);
1993
+ if (peg$r9.test(s6)) {
1994
+ peg$currPos++;
1995
+ } else {
1996
+ s6 = peg$FAILED;
1997
+ if (peg$silentFails === 0) {
1998
+ peg$fail(peg$e19);
1999
+ }
2000
+ }
2001
+ if (s6 !== peg$FAILED) {
2002
+ while (s6 !== peg$FAILED) {
2003
+ s5.push(s6);
2004
+ s6 = input.charAt(peg$currPos);
2005
+ if (peg$r9.test(s6)) {
2006
+ peg$currPos++;
2007
+ } else {
2008
+ s6 = peg$FAILED;
2009
+ if (peg$silentFails === 0) {
2010
+ peg$fail(peg$e19);
2011
+ }
2012
+ }
2013
+ }
2014
+ } else {
2015
+ s5 = peg$FAILED;
2016
+ }
2017
+ if (s5 !== peg$FAILED) {
2018
+ s3 = [s3, s4, s5];
2019
+ s2 = s3;
2020
+ } else {
2021
+ peg$currPos = s2;
2022
+ s2 = peg$FAILED;
2023
+ }
2024
+ } else {
2025
+ peg$currPos = s2;
2026
+ s2 = peg$FAILED;
2027
+ }
2028
+ if (s2 !== peg$FAILED) {
2029
+ s1 = input.substring(s1, peg$currPos);
2030
+ } else {
2031
+ s1 = s2;
2032
+ }
2033
+ if (s1 !== peg$FAILED) {
2034
+ peg$savedPos = s0;
2035
+ s1 = peg$f14();
2036
+ }
2037
+ s0 = s1;
2038
+ return s0;
2039
+ }
2040
+ __name(peg$parseunquotedString, "peg$parseunquotedString");
2041
+ function peg$parseunquotedStringWithoutSpaces() {
2042
+ var s0, s1, s2, s3, s4, s5;
2043
+ s0 = peg$currPos;
2044
+ s1 = peg$currPos;
2045
+ s2 = peg$currPos;
2046
+ s3 = peg$currPos;
2047
+ peg$silentFails++;
2048
+ s4 = input.charAt(peg$currPos);
2049
+ if (peg$r8.test(s4)) {
2050
+ peg$currPos++;
2051
+ } else {
2052
+ s4 = peg$FAILED;
2053
+ if (peg$silentFails === 0) {
2054
+ peg$fail(peg$e18);
2055
+ }
2056
+ }
2057
+ peg$silentFails--;
2058
+ if (s4 === peg$FAILED) {
2059
+ s3 = void 0;
2060
+ } else {
2061
+ peg$currPos = s3;
2062
+ s3 = peg$FAILED;
2063
+ }
2064
+ if (s3 !== peg$FAILED) {
2065
+ s4 = [];
2066
+ s5 = input.charAt(peg$currPos);
2067
+ if (peg$r10.test(s5)) {
2068
+ peg$currPos++;
2069
+ } else {
2070
+ s5 = peg$FAILED;
2071
+ if (peg$silentFails === 0) {
2072
+ peg$fail(peg$e20);
2073
+ }
2074
+ }
2075
+ if (s5 !== peg$FAILED) {
2076
+ while (s5 !== peg$FAILED) {
2077
+ s4.push(s5);
2078
+ s5 = input.charAt(peg$currPos);
2079
+ if (peg$r10.test(s5)) {
2080
+ peg$currPos++;
2081
+ } else {
2082
+ s5 = peg$FAILED;
2083
+ if (peg$silentFails === 0) {
2084
+ peg$fail(peg$e20);
2085
+ }
2086
+ }
2087
+ }
2088
+ } else {
2089
+ s4 = peg$FAILED;
2090
+ }
2091
+ if (s4 !== peg$FAILED) {
2092
+ s3 = [s3, s4];
2093
+ s2 = s3;
2094
+ } else {
2095
+ peg$currPos = s2;
2096
+ s2 = peg$FAILED;
2097
+ }
2098
+ } else {
2099
+ peg$currPos = s2;
2100
+ s2 = peg$FAILED;
2101
+ }
2102
+ if (s2 !== peg$FAILED) {
2103
+ s1 = input.substring(s1, peg$currPos);
2104
+ } else {
2105
+ s1 = s2;
2106
+ }
2107
+ if (s1 !== peg$FAILED) {
2108
+ peg$savedPos = s0;
2109
+ s1 = peg$f15();
2110
+ }
2111
+ s0 = s1;
2112
+ return s0;
2113
+ }
2114
+ __name(peg$parseunquotedStringWithoutSpaces, "peg$parseunquotedStringWithoutSpaces");
2115
+ function peg$parsequotedString() {
2116
+ var s0;
2117
+ s0 = peg$parseDQuotedString();
2118
+ if (s0 === peg$FAILED) {
2119
+ s0 = peg$parseSQuotedString();
2120
+ if (s0 === peg$FAILED) {
2121
+ s0 = peg$parseBQuotedString();
2122
+ }
2123
+ }
2124
+ return s0;
2125
+ }
2126
+ __name(peg$parsequotedString, "peg$parsequotedString");
2127
+ function peg$parseDQuotedString() {
2128
+ var s0, s1, s2, s3;
2129
+ s0 = peg$currPos;
2130
+ s1 = input.charAt(peg$currPos);
2131
+ if (peg$r11.test(s1)) {
2132
+ peg$currPos++;
2133
+ } else {
2134
+ s1 = peg$FAILED;
2135
+ if (peg$silentFails === 0) {
2136
+ peg$fail(peg$e21);
2137
+ }
2138
+ }
2139
+ if (s1 !== peg$FAILED) {
2140
+ s2 = [];
2141
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2142
+ s3 = peg$c10;
2143
+ peg$currPos += 2;
2144
+ } else {
2145
+ s3 = peg$FAILED;
2146
+ if (peg$silentFails === 0) {
2147
+ peg$fail(peg$e22);
2148
+ }
2149
+ }
2150
+ if (s3 === peg$FAILED) {
2151
+ s3 = input.charAt(peg$currPos);
2152
+ if (peg$r12.test(s3)) {
2153
+ peg$currPos++;
2154
+ } else {
2155
+ s3 = peg$FAILED;
2156
+ if (peg$silentFails === 0) {
2157
+ peg$fail(peg$e23);
2158
+ }
2159
+ }
2160
+ }
2161
+ while (s3 !== peg$FAILED) {
2162
+ s2.push(s3);
2163
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2164
+ s3 = peg$c10;
2165
+ peg$currPos += 2;
2166
+ } else {
2167
+ s3 = peg$FAILED;
2168
+ if (peg$silentFails === 0) {
2169
+ peg$fail(peg$e22);
2170
+ }
2171
+ }
2172
+ if (s3 === peg$FAILED) {
2173
+ s3 = input.charAt(peg$currPos);
2174
+ if (peg$r12.test(s3)) {
2175
+ peg$currPos++;
2176
+ } else {
2177
+ s3 = peg$FAILED;
2178
+ if (peg$silentFails === 0) {
2179
+ peg$fail(peg$e23);
2180
+ }
2181
+ }
2182
+ }
2183
+ }
2184
+ s3 = input.charAt(peg$currPos);
2185
+ if (peg$r11.test(s3)) {
2186
+ peg$currPos++;
2187
+ } else {
2188
+ s3 = peg$FAILED;
2189
+ if (peg$silentFails === 0) {
2190
+ peg$fail(peg$e21);
2191
+ }
2192
+ }
2193
+ if (s3 !== peg$FAILED) {
2194
+ peg$savedPos = s0;
2195
+ s0 = peg$f16(s1);
2196
+ } else {
2197
+ peg$currPos = s0;
2198
+ s0 = peg$FAILED;
2199
+ }
2200
+ } else {
2201
+ peg$currPos = s0;
2202
+ s0 = peg$FAILED;
2203
+ }
2204
+ return s0;
2205
+ }
2206
+ __name(peg$parseDQuotedString, "peg$parseDQuotedString");
2207
+ function peg$parseSQuotedString() {
2208
+ var s0, s1, s2, s3;
2209
+ s0 = peg$currPos;
2210
+ s1 = input.charAt(peg$currPos);
2211
+ if (peg$r13.test(s1)) {
2212
+ peg$currPos++;
2213
+ } else {
2214
+ s1 = peg$FAILED;
2215
+ if (peg$silentFails === 0) {
2216
+ peg$fail(peg$e24);
2217
+ }
2218
+ }
2219
+ if (s1 !== peg$FAILED) {
2220
+ s2 = [];
2221
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2222
+ s3 = peg$c11;
2223
+ peg$currPos += 2;
2224
+ } else {
2225
+ s3 = peg$FAILED;
2226
+ if (peg$silentFails === 0) {
2227
+ peg$fail(peg$e25);
2228
+ }
2229
+ }
2230
+ if (s3 === peg$FAILED) {
2231
+ s3 = input.charAt(peg$currPos);
2232
+ if (peg$r14.test(s3)) {
2233
+ peg$currPos++;
2234
+ } else {
2235
+ s3 = peg$FAILED;
2236
+ if (peg$silentFails === 0) {
2237
+ peg$fail(peg$e26);
2238
+ }
2239
+ }
2240
+ }
2241
+ while (s3 !== peg$FAILED) {
2242
+ s2.push(s3);
2243
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2244
+ s3 = peg$c11;
2245
+ peg$currPos += 2;
2246
+ } else {
2247
+ s3 = peg$FAILED;
2248
+ if (peg$silentFails === 0) {
2249
+ peg$fail(peg$e25);
2250
+ }
2251
+ }
2252
+ if (s3 === peg$FAILED) {
2253
+ s3 = input.charAt(peg$currPos);
2254
+ if (peg$r14.test(s3)) {
2255
+ peg$currPos++;
2256
+ } else {
2257
+ s3 = peg$FAILED;
2258
+ if (peg$silentFails === 0) {
2259
+ peg$fail(peg$e26);
2260
+ }
2261
+ }
2262
+ }
2263
+ }
2264
+ s3 = input.charAt(peg$currPos);
2265
+ if (peg$r13.test(s3)) {
2266
+ peg$currPos++;
2267
+ } else {
2268
+ s3 = peg$FAILED;
2269
+ if (peg$silentFails === 0) {
2270
+ peg$fail(peg$e24);
2271
+ }
2272
+ }
2273
+ if (s3 !== peg$FAILED) {
2274
+ peg$savedPos = s0;
2275
+ s0 = peg$f17(s1);
2276
+ } else {
2277
+ peg$currPos = s0;
2278
+ s0 = peg$FAILED;
2279
+ }
2280
+ } else {
2281
+ peg$currPos = s0;
2282
+ s0 = peg$FAILED;
2283
+ }
2284
+ return s0;
2285
+ }
2286
+ __name(peg$parseSQuotedString, "peg$parseSQuotedString");
2287
+ function peg$parseBQuotedString() {
2288
+ var s0, s1, s2, s3;
2289
+ s0 = peg$currPos;
2290
+ s1 = input.charAt(peg$currPos);
2291
+ if (peg$r15.test(s1)) {
2292
+ peg$currPos++;
2293
+ } else {
2294
+ s1 = peg$FAILED;
2295
+ if (peg$silentFails === 0) {
2296
+ peg$fail(peg$e27);
2297
+ }
2298
+ }
2299
+ if (s1 !== peg$FAILED) {
2300
+ s2 = [];
2301
+ if (input.substr(peg$currPos, 2) === peg$c12) {
2302
+ s3 = peg$c12;
2303
+ peg$currPos += 2;
2304
+ } else {
2305
+ s3 = peg$FAILED;
2306
+ if (peg$silentFails === 0) {
2307
+ peg$fail(peg$e28);
2308
+ }
2309
+ }
2310
+ if (s3 === peg$FAILED) {
2311
+ s3 = input.charAt(peg$currPos);
2312
+ if (peg$r16.test(s3)) {
2313
+ peg$currPos++;
2314
+ } else {
2315
+ s3 = peg$FAILED;
2316
+ if (peg$silentFails === 0) {
2317
+ peg$fail(peg$e29);
2318
+ }
2319
+ }
2320
+ }
2321
+ while (s3 !== peg$FAILED) {
2322
+ s2.push(s3);
2323
+ if (input.substr(peg$currPos, 2) === peg$c12) {
2324
+ s3 = peg$c12;
2325
+ peg$currPos += 2;
2326
+ } else {
2327
+ s3 = peg$FAILED;
2328
+ if (peg$silentFails === 0) {
2329
+ peg$fail(peg$e28);
2330
+ }
2331
+ }
2332
+ if (s3 === peg$FAILED) {
2333
+ s3 = input.charAt(peg$currPos);
2334
+ if (peg$r16.test(s3)) {
2335
+ peg$currPos++;
2336
+ } else {
2337
+ s3 = peg$FAILED;
2338
+ if (peg$silentFails === 0) {
2339
+ peg$fail(peg$e29);
2340
+ }
2341
+ }
2342
+ }
2343
+ }
2344
+ s3 = input.charAt(peg$currPos);
2345
+ if (peg$r15.test(s3)) {
2346
+ peg$currPos++;
2347
+ } else {
2348
+ s3 = peg$FAILED;
2349
+ if (peg$silentFails === 0) {
2350
+ peg$fail(peg$e27);
2351
+ }
2352
+ }
2353
+ if (s3 !== peg$FAILED) {
2354
+ peg$savedPos = s0;
2355
+ s0 = peg$f18(s1);
2356
+ } else {
2357
+ peg$currPos = s0;
2358
+ s0 = peg$FAILED;
2359
+ }
2360
+ } else {
2361
+ peg$currPos = s0;
2362
+ s0 = peg$FAILED;
2363
+ }
2364
+ return s0;
2365
+ }
2366
+ __name(peg$parseBQuotedString, "peg$parseBQuotedString");
2367
+ function peg$parsemultiLineString() {
2368
+ var s0;
2369
+ s0 = peg$parsesingleSQuotedMultiLineString();
2370
+ if (s0 === peg$FAILED) {
2371
+ s0 = peg$parsesingleDQuotedMultiLineString();
2372
+ if (s0 === peg$FAILED) {
2373
+ s0 = peg$parsetripleDQuotedMultiLineString();
2374
+ if (s0 === peg$FAILED) {
2375
+ s0 = peg$parsetripleBQuotedMultiLineString();
2376
+ }
2377
+ }
2378
+ }
2379
+ return s0;
2380
+ }
2381
+ __name(peg$parsemultiLineString, "peg$parsemultiLineString");
2382
+ function peg$parsesingleSQuotedMultiLineString() {
2383
+ var s0, s1, s2, s3, s4, s5;
2384
+ s0 = peg$currPos;
2385
+ s1 = input.charAt(peg$currPos);
2386
+ if (peg$r13.test(s1)) {
2387
+ peg$currPos++;
2388
+ } else {
2389
+ s1 = peg$FAILED;
2390
+ if (peg$silentFails === 0) {
2391
+ peg$fail(peg$e24);
2392
+ }
2393
+ }
2394
+ if (s1 !== peg$FAILED) {
2395
+ s2 = [];
2396
+ s3 = peg$currPos;
2397
+ s4 = [];
2398
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2399
+ s5 = peg$c11;
2400
+ peg$currPos += 2;
2401
+ } else {
2402
+ s5 = peg$FAILED;
2403
+ if (peg$silentFails === 0) {
2404
+ peg$fail(peg$e25);
2405
+ }
2406
+ }
2407
+ if (s5 === peg$FAILED) {
2408
+ s5 = input.charAt(peg$currPos);
2409
+ if (peg$r14.test(s5)) {
2410
+ peg$currPos++;
2411
+ } else {
2412
+ s5 = peg$FAILED;
2413
+ if (peg$silentFails === 0) {
2414
+ peg$fail(peg$e26);
2415
+ }
2416
+ }
2417
+ }
2418
+ while (s5 !== peg$FAILED) {
2419
+ s4.push(s5);
2420
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2421
+ s5 = peg$c11;
2422
+ peg$currPos += 2;
2423
+ } else {
2424
+ s5 = peg$FAILED;
2425
+ if (peg$silentFails === 0) {
2426
+ peg$fail(peg$e25);
2427
+ }
2428
+ }
2429
+ if (s5 === peg$FAILED) {
2430
+ s5 = input.charAt(peg$currPos);
2431
+ if (peg$r14.test(s5)) {
2432
+ peg$currPos++;
2433
+ } else {
2434
+ s5 = peg$FAILED;
2435
+ if (peg$silentFails === 0) {
2436
+ peg$fail(peg$e26);
2437
+ }
2438
+ }
2439
+ }
2440
+ }
2441
+ if (input.charCodeAt(peg$currPos) === 10) {
2442
+ s5 = peg$c0;
2443
+ peg$currPos++;
2444
+ } else {
2445
+ s5 = peg$FAILED;
2446
+ if (peg$silentFails === 0) {
2447
+ peg$fail(peg$e0);
2448
+ }
2449
+ }
2450
+ if (s5 !== peg$FAILED) {
2451
+ s4 = [s4, s5];
2452
+ s3 = s4;
2453
+ } else {
2454
+ peg$currPos = s3;
2455
+ s3 = peg$FAILED;
2456
+ }
2457
+ if (s3 !== peg$FAILED) {
2458
+ while (s3 !== peg$FAILED) {
2459
+ s2.push(s3);
2460
+ s3 = peg$currPos;
2461
+ s4 = [];
2462
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2463
+ s5 = peg$c11;
2464
+ peg$currPos += 2;
2465
+ } else {
2466
+ s5 = peg$FAILED;
2467
+ if (peg$silentFails === 0) {
2468
+ peg$fail(peg$e25);
2469
+ }
2470
+ }
2471
+ if (s5 === peg$FAILED) {
2472
+ s5 = input.charAt(peg$currPos);
2473
+ if (peg$r14.test(s5)) {
2474
+ peg$currPos++;
2475
+ } else {
2476
+ s5 = peg$FAILED;
2477
+ if (peg$silentFails === 0) {
2478
+ peg$fail(peg$e26);
2479
+ }
2480
+ }
2481
+ }
2482
+ while (s5 !== peg$FAILED) {
2483
+ s4.push(s5);
2484
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2485
+ s5 = peg$c11;
2486
+ peg$currPos += 2;
2487
+ } else {
2488
+ s5 = peg$FAILED;
2489
+ if (peg$silentFails === 0) {
2490
+ peg$fail(peg$e25);
2491
+ }
2492
+ }
2493
+ if (s5 === peg$FAILED) {
2494
+ s5 = input.charAt(peg$currPos);
2495
+ if (peg$r14.test(s5)) {
2496
+ peg$currPos++;
2497
+ } else {
2498
+ s5 = peg$FAILED;
2499
+ if (peg$silentFails === 0) {
2500
+ peg$fail(peg$e26);
2501
+ }
2502
+ }
2503
+ }
2504
+ }
2505
+ if (input.charCodeAt(peg$currPos) === 10) {
2506
+ s5 = peg$c0;
2507
+ peg$currPos++;
2508
+ } else {
2509
+ s5 = peg$FAILED;
2510
+ if (peg$silentFails === 0) {
2511
+ peg$fail(peg$e0);
2512
+ }
2513
+ }
2514
+ if (s5 !== peg$FAILED) {
2515
+ s4 = [s4, s5];
2516
+ s3 = s4;
2517
+ } else {
2518
+ peg$currPos = s3;
2519
+ s3 = peg$FAILED;
2520
+ }
2521
+ }
2522
+ } else {
2523
+ s2 = peg$FAILED;
2524
+ }
2525
+ if (s2 !== peg$FAILED) {
2526
+ s3 = [];
2527
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2528
+ s4 = peg$c11;
2529
+ peg$currPos += 2;
2530
+ } else {
2531
+ s4 = peg$FAILED;
2532
+ if (peg$silentFails === 0) {
2533
+ peg$fail(peg$e25);
2534
+ }
2535
+ }
2536
+ if (s4 === peg$FAILED) {
2537
+ s4 = input.charAt(peg$currPos);
2538
+ if (peg$r14.test(s4)) {
2539
+ peg$currPos++;
2540
+ } else {
2541
+ s4 = peg$FAILED;
2542
+ if (peg$silentFails === 0) {
2543
+ peg$fail(peg$e26);
2544
+ }
2545
+ }
2546
+ }
2547
+ while (s4 !== peg$FAILED) {
2548
+ s3.push(s4);
2549
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2550
+ s4 = peg$c11;
2551
+ peg$currPos += 2;
2552
+ } else {
2553
+ s4 = peg$FAILED;
2554
+ if (peg$silentFails === 0) {
2555
+ peg$fail(peg$e25);
2556
+ }
2557
+ }
2558
+ if (s4 === peg$FAILED) {
2559
+ s4 = input.charAt(peg$currPos);
2560
+ if (peg$r14.test(s4)) {
2561
+ peg$currPos++;
2562
+ } else {
2563
+ s4 = peg$FAILED;
2564
+ if (peg$silentFails === 0) {
2565
+ peg$fail(peg$e26);
2566
+ }
2567
+ }
2568
+ }
2569
+ }
2570
+ s4 = input.charAt(peg$currPos);
2571
+ if (peg$r13.test(s4)) {
2572
+ peg$currPos++;
2573
+ } else {
2574
+ s4 = peg$FAILED;
2575
+ if (peg$silentFails === 0) {
2576
+ peg$fail(peg$e24);
2577
+ }
2578
+ }
2579
+ if (s4 !== peg$FAILED) {
2580
+ peg$savedPos = s0;
2581
+ s0 = peg$f19(s1);
2582
+ } else {
2583
+ peg$currPos = s0;
2584
+ s0 = peg$FAILED;
2585
+ }
2586
+ } else {
2587
+ peg$currPos = s0;
2588
+ s0 = peg$FAILED;
2589
+ }
2590
+ } else {
2591
+ peg$currPos = s0;
2592
+ s0 = peg$FAILED;
2593
+ }
2594
+ return s0;
2595
+ }
2596
+ __name(peg$parsesingleSQuotedMultiLineString, "peg$parsesingleSQuotedMultiLineString");
2597
+ function peg$parsesingleDQuotedMultiLineString() {
2598
+ var s0, s1, s2, s3, s4, s5;
2599
+ s0 = peg$currPos;
2600
+ s1 = input.charAt(peg$currPos);
2601
+ if (peg$r11.test(s1)) {
2602
+ peg$currPos++;
2603
+ } else {
2604
+ s1 = peg$FAILED;
2605
+ if (peg$silentFails === 0) {
2606
+ peg$fail(peg$e21);
2607
+ }
2608
+ }
2609
+ if (s1 !== peg$FAILED) {
2610
+ s2 = [];
2611
+ s3 = peg$currPos;
2612
+ s4 = [];
2613
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2614
+ s5 = peg$c10;
2615
+ peg$currPos += 2;
2616
+ } else {
2617
+ s5 = peg$FAILED;
2618
+ if (peg$silentFails === 0) {
2619
+ peg$fail(peg$e22);
2620
+ }
2621
+ }
2622
+ if (s5 === peg$FAILED) {
2623
+ s5 = input.charAt(peg$currPos);
2624
+ if (peg$r12.test(s5)) {
2625
+ peg$currPos++;
2626
+ } else {
2627
+ s5 = peg$FAILED;
2628
+ if (peg$silentFails === 0) {
2629
+ peg$fail(peg$e23);
2630
+ }
2631
+ }
2632
+ }
2633
+ while (s5 !== peg$FAILED) {
2634
+ s4.push(s5);
2635
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2636
+ s5 = peg$c10;
2637
+ peg$currPos += 2;
2638
+ } else {
2639
+ s5 = peg$FAILED;
2640
+ if (peg$silentFails === 0) {
2641
+ peg$fail(peg$e22);
2642
+ }
2643
+ }
2644
+ if (s5 === peg$FAILED) {
2645
+ s5 = input.charAt(peg$currPos);
2646
+ if (peg$r12.test(s5)) {
2647
+ peg$currPos++;
2648
+ } else {
2649
+ s5 = peg$FAILED;
2650
+ if (peg$silentFails === 0) {
2651
+ peg$fail(peg$e23);
2652
+ }
2653
+ }
2654
+ }
2655
+ }
2656
+ if (input.charCodeAt(peg$currPos) === 10) {
2657
+ s5 = peg$c0;
2658
+ peg$currPos++;
2659
+ } else {
2660
+ s5 = peg$FAILED;
2661
+ if (peg$silentFails === 0) {
2662
+ peg$fail(peg$e0);
2663
+ }
2664
+ }
2665
+ if (s5 !== peg$FAILED) {
2666
+ s4 = [s4, s5];
2667
+ s3 = s4;
2668
+ } else {
2669
+ peg$currPos = s3;
2670
+ s3 = peg$FAILED;
2671
+ }
2672
+ if (s3 !== peg$FAILED) {
2673
+ while (s3 !== peg$FAILED) {
2674
+ s2.push(s3);
2675
+ s3 = peg$currPos;
2676
+ s4 = [];
2677
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2678
+ s5 = peg$c10;
2679
+ peg$currPos += 2;
2680
+ } else {
2681
+ s5 = peg$FAILED;
2682
+ if (peg$silentFails === 0) {
2683
+ peg$fail(peg$e22);
2684
+ }
2685
+ }
2686
+ if (s5 === peg$FAILED) {
2687
+ s5 = input.charAt(peg$currPos);
2688
+ if (peg$r12.test(s5)) {
2689
+ peg$currPos++;
2690
+ } else {
2691
+ s5 = peg$FAILED;
2692
+ if (peg$silentFails === 0) {
2693
+ peg$fail(peg$e23);
2694
+ }
2695
+ }
2696
+ }
2697
+ while (s5 !== peg$FAILED) {
2698
+ s4.push(s5);
2699
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2700
+ s5 = peg$c10;
2701
+ peg$currPos += 2;
2702
+ } else {
2703
+ s5 = peg$FAILED;
2704
+ if (peg$silentFails === 0) {
2705
+ peg$fail(peg$e22);
2706
+ }
2707
+ }
2708
+ if (s5 === peg$FAILED) {
2709
+ s5 = input.charAt(peg$currPos);
2710
+ if (peg$r12.test(s5)) {
2711
+ peg$currPos++;
2712
+ } else {
2713
+ s5 = peg$FAILED;
2714
+ if (peg$silentFails === 0) {
2715
+ peg$fail(peg$e23);
2716
+ }
2717
+ }
2718
+ }
2719
+ }
2720
+ if (input.charCodeAt(peg$currPos) === 10) {
2721
+ s5 = peg$c0;
2722
+ peg$currPos++;
2723
+ } else {
2724
+ s5 = peg$FAILED;
2725
+ if (peg$silentFails === 0) {
2726
+ peg$fail(peg$e0);
2727
+ }
2728
+ }
2729
+ if (s5 !== peg$FAILED) {
2730
+ s4 = [s4, s5];
2731
+ s3 = s4;
2732
+ } else {
2733
+ peg$currPos = s3;
2734
+ s3 = peg$FAILED;
2735
+ }
2736
+ }
2737
+ } else {
2738
+ s2 = peg$FAILED;
2739
+ }
2740
+ if (s2 !== peg$FAILED) {
2741
+ s3 = [];
2742
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2743
+ s4 = peg$c10;
2744
+ peg$currPos += 2;
2745
+ } else {
2746
+ s4 = peg$FAILED;
2747
+ if (peg$silentFails === 0) {
2748
+ peg$fail(peg$e22);
2749
+ }
2750
+ }
2751
+ if (s4 === peg$FAILED) {
2752
+ s4 = input.charAt(peg$currPos);
2753
+ if (peg$r12.test(s4)) {
2754
+ peg$currPos++;
2755
+ } else {
2756
+ s4 = peg$FAILED;
2757
+ if (peg$silentFails === 0) {
2758
+ peg$fail(peg$e23);
2759
+ }
2760
+ }
2761
+ }
2762
+ while (s4 !== peg$FAILED) {
2763
+ s3.push(s4);
2764
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2765
+ s4 = peg$c10;
2766
+ peg$currPos += 2;
2767
+ } else {
2768
+ s4 = peg$FAILED;
2769
+ if (peg$silentFails === 0) {
2770
+ peg$fail(peg$e22);
2771
+ }
2772
+ }
2773
+ if (s4 === peg$FAILED) {
2774
+ s4 = input.charAt(peg$currPos);
2775
+ if (peg$r12.test(s4)) {
2776
+ peg$currPos++;
2777
+ } else {
2778
+ s4 = peg$FAILED;
2779
+ if (peg$silentFails === 0) {
2780
+ peg$fail(peg$e23);
2781
+ }
2782
+ }
2783
+ }
2784
+ }
2785
+ s4 = input.charAt(peg$currPos);
2786
+ if (peg$r11.test(s4)) {
2787
+ peg$currPos++;
2788
+ } else {
2789
+ s4 = peg$FAILED;
2790
+ if (peg$silentFails === 0) {
2791
+ peg$fail(peg$e21);
2792
+ }
2793
+ }
2794
+ if (s4 !== peg$FAILED) {
2795
+ peg$savedPos = s0;
2796
+ s0 = peg$f20(s1);
2797
+ } else {
2798
+ peg$currPos = s0;
2799
+ s0 = peg$FAILED;
2800
+ }
2801
+ } else {
2802
+ peg$currPos = s0;
2803
+ s0 = peg$FAILED;
2804
+ }
2805
+ } else {
2806
+ peg$currPos = s0;
2807
+ s0 = peg$FAILED;
2808
+ }
2809
+ return s0;
2810
+ }
2811
+ __name(peg$parsesingleDQuotedMultiLineString, "peg$parsesingleDQuotedMultiLineString");
2812
+ function peg$parsetripleDQuotedMultiLineString() {
2813
+ var s0, s1, s2, s3, s4, s5, s6, s7;
2814
+ s0 = peg$currPos;
2815
+ if (input.substr(peg$currPos, 3) === peg$c13) {
2816
+ s1 = peg$c13;
2817
+ peg$currPos += 3;
2818
+ } else {
2819
+ s1 = peg$FAILED;
2820
+ if (peg$silentFails === 0) {
2821
+ peg$fail(peg$e30);
2822
+ }
2823
+ }
2824
+ if (s1 !== peg$FAILED) {
2825
+ s2 = [];
2826
+ s3 = peg$currPos;
2827
+ s4 = [];
2828
+ if (input.substr(peg$currPos, 4) === peg$c14) {
2829
+ s5 = peg$c14;
2830
+ peg$currPos += 4;
2831
+ } else {
2832
+ s5 = peg$FAILED;
2833
+ if (peg$silentFails === 0) {
2834
+ peg$fail(peg$e31);
2835
+ }
2836
+ }
2837
+ if (s5 === peg$FAILED) {
2838
+ s5 = peg$currPos;
2839
+ s6 = peg$currPos;
2840
+ peg$silentFails++;
2841
+ if (input.substr(peg$currPos, 3) === peg$c13) {
2842
+ s7 = peg$c13;
2843
+ peg$currPos += 3;
2844
+ } else {
2845
+ s7 = peg$FAILED;
2846
+ if (peg$silentFails === 0) {
2847
+ peg$fail(peg$e30);
2848
+ }
2849
+ }
2850
+ peg$silentFails--;
2851
+ if (s7 === peg$FAILED) {
2852
+ s6 = void 0;
2853
+ } else {
2854
+ peg$currPos = s6;
2855
+ s6 = peg$FAILED;
2856
+ }
2857
+ if (s6 !== peg$FAILED) {
2858
+ s7 = input.charAt(peg$currPos);
2859
+ if (peg$r2.test(s7)) {
2860
+ peg$currPos++;
2861
+ } else {
2862
+ s7 = peg$FAILED;
2863
+ if (peg$silentFails === 0) {
2864
+ peg$fail(peg$e7);
2865
+ }
2866
+ }
2867
+ if (s7 !== peg$FAILED) {
2868
+ s6 = [s6, s7];
2869
+ s5 = s6;
2870
+ } else {
2871
+ peg$currPos = s5;
2872
+ s5 = peg$FAILED;
2873
+ }
2874
+ } else {
2875
+ peg$currPos = s5;
2876
+ s5 = peg$FAILED;
2877
+ }
2878
+ }
2879
+ while (s5 !== peg$FAILED) {
2880
+ s4.push(s5);
2881
+ if (input.substr(peg$currPos, 4) === peg$c14) {
2882
+ s5 = peg$c14;
2883
+ peg$currPos += 4;
2884
+ } else {
2885
+ s5 = peg$FAILED;
2886
+ if (peg$silentFails === 0) {
2887
+ peg$fail(peg$e31);
2888
+ }
2889
+ }
2890
+ if (s5 === peg$FAILED) {
2891
+ s5 = peg$currPos;
2892
+ s6 = peg$currPos;
2893
+ peg$silentFails++;
2894
+ if (input.substr(peg$currPos, 3) === peg$c13) {
2895
+ s7 = peg$c13;
2896
+ peg$currPos += 3;
2897
+ } else {
2898
+ s7 = peg$FAILED;
2899
+ if (peg$silentFails === 0) {
2900
+ peg$fail(peg$e30);
2901
+ }
2902
+ }
2903
+ peg$silentFails--;
2904
+ if (s7 === peg$FAILED) {
2905
+ s6 = void 0;
2906
+ } else {
2907
+ peg$currPos = s6;
2908
+ s6 = peg$FAILED;
2909
+ }
2910
+ if (s6 !== peg$FAILED) {
2911
+ s7 = input.charAt(peg$currPos);
2912
+ if (peg$r2.test(s7)) {
2913
+ peg$currPos++;
2914
+ } else {
2915
+ s7 = peg$FAILED;
2916
+ if (peg$silentFails === 0) {
2917
+ peg$fail(peg$e7);
2918
+ }
2919
+ }
2920
+ if (s7 !== peg$FAILED) {
2921
+ s6 = [s6, s7];
2922
+ s5 = s6;
2923
+ } else {
2924
+ peg$currPos = s5;
2925
+ s5 = peg$FAILED;
2926
+ }
2927
+ } else {
2928
+ peg$currPos = s5;
2929
+ s5 = peg$FAILED;
2930
+ }
2931
+ }
2932
+ }
2933
+ if (input.charCodeAt(peg$currPos) === 10) {
2934
+ s5 = peg$c0;
2935
+ peg$currPos++;
2936
+ } else {
2937
+ s5 = peg$FAILED;
2938
+ if (peg$silentFails === 0) {
2939
+ peg$fail(peg$e0);
2940
+ }
2941
+ }
2942
+ if (s5 !== peg$FAILED) {
2943
+ s4 = [s4, s5];
2944
+ s3 = s4;
2945
+ } else {
2946
+ peg$currPos = s3;
2947
+ s3 = peg$FAILED;
2948
+ }
2949
+ if (s3 !== peg$FAILED) {
2950
+ while (s3 !== peg$FAILED) {
2951
+ s2.push(s3);
2952
+ s3 = peg$currPos;
2953
+ s4 = [];
2954
+ if (input.substr(peg$currPos, 4) === peg$c14) {
2955
+ s5 = peg$c14;
2956
+ peg$currPos += 4;
2957
+ } else {
2958
+ s5 = peg$FAILED;
2959
+ if (peg$silentFails === 0) {
2960
+ peg$fail(peg$e31);
2961
+ }
2962
+ }
2963
+ if (s5 === peg$FAILED) {
2964
+ s5 = peg$currPos;
2965
+ s6 = peg$currPos;
2966
+ peg$silentFails++;
2967
+ if (input.substr(peg$currPos, 3) === peg$c13) {
2968
+ s7 = peg$c13;
2969
+ peg$currPos += 3;
2970
+ } else {
2971
+ s7 = peg$FAILED;
2972
+ if (peg$silentFails === 0) {
2973
+ peg$fail(peg$e30);
2974
+ }
2975
+ }
2976
+ peg$silentFails--;
2977
+ if (s7 === peg$FAILED) {
2978
+ s6 = void 0;
2979
+ } else {
2980
+ peg$currPos = s6;
2981
+ s6 = peg$FAILED;
2982
+ }
2983
+ if (s6 !== peg$FAILED) {
2984
+ s7 = input.charAt(peg$currPos);
2985
+ if (peg$r2.test(s7)) {
2986
+ peg$currPos++;
2987
+ } else {
2988
+ s7 = peg$FAILED;
2989
+ if (peg$silentFails === 0) {
2990
+ peg$fail(peg$e7);
2991
+ }
2992
+ }
2993
+ if (s7 !== peg$FAILED) {
2994
+ s6 = [s6, s7];
2995
+ s5 = s6;
2996
+ } else {
2997
+ peg$currPos = s5;
2998
+ s5 = peg$FAILED;
2999
+ }
3000
+ } else {
3001
+ peg$currPos = s5;
3002
+ s5 = peg$FAILED;
3003
+ }
3004
+ }
3005
+ while (s5 !== peg$FAILED) {
3006
+ s4.push(s5);
3007
+ if (input.substr(peg$currPos, 4) === peg$c14) {
3008
+ s5 = peg$c14;
3009
+ peg$currPos += 4;
3010
+ } else {
3011
+ s5 = peg$FAILED;
3012
+ if (peg$silentFails === 0) {
3013
+ peg$fail(peg$e31);
3014
+ }
3015
+ }
3016
+ if (s5 === peg$FAILED) {
3017
+ s5 = peg$currPos;
3018
+ s6 = peg$currPos;
3019
+ peg$silentFails++;
3020
+ if (input.substr(peg$currPos, 3) === peg$c13) {
3021
+ s7 = peg$c13;
3022
+ peg$currPos += 3;
3023
+ } else {
3024
+ s7 = peg$FAILED;
3025
+ if (peg$silentFails === 0) {
3026
+ peg$fail(peg$e30);
3027
+ }
3028
+ }
3029
+ peg$silentFails--;
3030
+ if (s7 === peg$FAILED) {
3031
+ s6 = void 0;
3032
+ } else {
3033
+ peg$currPos = s6;
3034
+ s6 = peg$FAILED;
3035
+ }
3036
+ if (s6 !== peg$FAILED) {
3037
+ s7 = input.charAt(peg$currPos);
3038
+ if (peg$r2.test(s7)) {
3039
+ peg$currPos++;
3040
+ } else {
3041
+ s7 = peg$FAILED;
3042
+ if (peg$silentFails === 0) {
3043
+ peg$fail(peg$e7);
3044
+ }
3045
+ }
3046
+ if (s7 !== peg$FAILED) {
3047
+ s6 = [s6, s7];
3048
+ s5 = s6;
3049
+ } else {
3050
+ peg$currPos = s5;
3051
+ s5 = peg$FAILED;
3052
+ }
3053
+ } else {
3054
+ peg$currPos = s5;
3055
+ s5 = peg$FAILED;
3056
+ }
3057
+ }
3058
+ }
3059
+ if (input.charCodeAt(peg$currPos) === 10) {
3060
+ s5 = peg$c0;
3061
+ peg$currPos++;
3062
+ } else {
3063
+ s5 = peg$FAILED;
3064
+ if (peg$silentFails === 0) {
3065
+ peg$fail(peg$e0);
3066
+ }
3067
+ }
3068
+ if (s5 !== peg$FAILED) {
3069
+ s4 = [s4, s5];
3070
+ s3 = s4;
3071
+ } else {
3072
+ peg$currPos = s3;
3073
+ s3 = peg$FAILED;
3074
+ }
3075
+ }
3076
+ } else {
3077
+ s2 = peg$FAILED;
3078
+ }
3079
+ if (s2 !== peg$FAILED) {
3080
+ s3 = [];
3081
+ if (input.substr(peg$currPos, 4) === peg$c14) {
3082
+ s4 = peg$c14;
3083
+ peg$currPos += 4;
3084
+ } else {
3085
+ s4 = peg$FAILED;
3086
+ if (peg$silentFails === 0) {
3087
+ peg$fail(peg$e31);
3088
+ }
3089
+ }
3090
+ if (s4 === peg$FAILED) {
3091
+ s4 = peg$currPos;
3092
+ s5 = peg$currPos;
3093
+ peg$silentFails++;
3094
+ if (input.substr(peg$currPos, 3) === peg$c13) {
3095
+ s6 = peg$c13;
3096
+ peg$currPos += 3;
3097
+ } else {
3098
+ s6 = peg$FAILED;
3099
+ if (peg$silentFails === 0) {
3100
+ peg$fail(peg$e30);
3101
+ }
3102
+ }
3103
+ peg$silentFails--;
3104
+ if (s6 === peg$FAILED) {
3105
+ s5 = void 0;
3106
+ } else {
3107
+ peg$currPos = s5;
3108
+ s5 = peg$FAILED;
3109
+ }
3110
+ if (s5 !== peg$FAILED) {
3111
+ s6 = input.charAt(peg$currPos);
3112
+ if (peg$r2.test(s6)) {
3113
+ peg$currPos++;
3114
+ } else {
3115
+ s6 = peg$FAILED;
3116
+ if (peg$silentFails === 0) {
3117
+ peg$fail(peg$e7);
3118
+ }
3119
+ }
3120
+ if (s6 !== peg$FAILED) {
3121
+ s5 = [s5, s6];
3122
+ s4 = s5;
3123
+ } else {
3124
+ peg$currPos = s4;
3125
+ s4 = peg$FAILED;
3126
+ }
3127
+ } else {
3128
+ peg$currPos = s4;
3129
+ s4 = peg$FAILED;
3130
+ }
3131
+ }
3132
+ while (s4 !== peg$FAILED) {
3133
+ s3.push(s4);
3134
+ if (input.substr(peg$currPos, 4) === peg$c14) {
3135
+ s4 = peg$c14;
3136
+ peg$currPos += 4;
3137
+ } else {
3138
+ s4 = peg$FAILED;
3139
+ if (peg$silentFails === 0) {
3140
+ peg$fail(peg$e31);
3141
+ }
3142
+ }
3143
+ if (s4 === peg$FAILED) {
3144
+ s4 = peg$currPos;
3145
+ s5 = peg$currPos;
3146
+ peg$silentFails++;
3147
+ if (input.substr(peg$currPos, 3) === peg$c13) {
3148
+ s6 = peg$c13;
3149
+ peg$currPos += 3;
3150
+ } else {
3151
+ s6 = peg$FAILED;
3152
+ if (peg$silentFails === 0) {
3153
+ peg$fail(peg$e30);
3154
+ }
3155
+ }
3156
+ peg$silentFails--;
3157
+ if (s6 === peg$FAILED) {
3158
+ s5 = void 0;
3159
+ } else {
3160
+ peg$currPos = s5;
3161
+ s5 = peg$FAILED;
3162
+ }
3163
+ if (s5 !== peg$FAILED) {
3164
+ s6 = input.charAt(peg$currPos);
3165
+ if (peg$r2.test(s6)) {
3166
+ peg$currPos++;
3167
+ } else {
3168
+ s6 = peg$FAILED;
3169
+ if (peg$silentFails === 0) {
3170
+ peg$fail(peg$e7);
3171
+ }
3172
+ }
3173
+ if (s6 !== peg$FAILED) {
3174
+ s5 = [s5, s6];
3175
+ s4 = s5;
3176
+ } else {
3177
+ peg$currPos = s4;
3178
+ s4 = peg$FAILED;
3179
+ }
3180
+ } else {
3181
+ peg$currPos = s4;
3182
+ s4 = peg$FAILED;
3183
+ }
3184
+ }
3185
+ }
3186
+ if (input.substr(peg$currPos, 3) === peg$c13) {
3187
+ s4 = peg$c13;
3188
+ peg$currPos += 3;
3189
+ } else {
3190
+ s4 = peg$FAILED;
3191
+ if (peg$silentFails === 0) {
3192
+ peg$fail(peg$e30);
3193
+ }
3194
+ }
3195
+ if (s4 !== peg$FAILED) {
3196
+ peg$savedPos = s0;
3197
+ s0 = peg$f21(s1);
3198
+ } else {
3199
+ peg$currPos = s0;
3200
+ s0 = peg$FAILED;
3201
+ }
3202
+ } else {
3203
+ peg$currPos = s0;
3204
+ s0 = peg$FAILED;
3205
+ }
3206
+ } else {
3207
+ peg$currPos = s0;
3208
+ s0 = peg$FAILED;
3209
+ }
3210
+ return s0;
3211
+ }
3212
+ __name(peg$parsetripleDQuotedMultiLineString, "peg$parsetripleDQuotedMultiLineString");
3213
+ function peg$parsetripleBQuotedMultiLineString() {
3214
+ var s0, s1, s2, s3, s4, s5, s6, s7;
3215
+ s0 = peg$currPos;
3216
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3217
+ s1 = peg$c15;
3218
+ peg$currPos += 3;
3219
+ } else {
3220
+ s1 = peg$FAILED;
3221
+ if (peg$silentFails === 0) {
3222
+ peg$fail(peg$e32);
3223
+ }
3224
+ }
3225
+ if (s1 !== peg$FAILED) {
3226
+ s2 = [];
3227
+ s3 = peg$currPos;
3228
+ s4 = [];
3229
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3230
+ s5 = peg$c16;
3231
+ peg$currPos += 4;
3232
+ } else {
3233
+ s5 = peg$FAILED;
3234
+ if (peg$silentFails === 0) {
3235
+ peg$fail(peg$e33);
3236
+ }
3237
+ }
3238
+ if (s5 === peg$FAILED) {
3239
+ s5 = peg$currPos;
3240
+ s6 = peg$currPos;
3241
+ peg$silentFails++;
3242
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3243
+ s7 = peg$c15;
3244
+ peg$currPos += 3;
3245
+ } else {
3246
+ s7 = peg$FAILED;
3247
+ if (peg$silentFails === 0) {
3248
+ peg$fail(peg$e32);
3249
+ }
3250
+ }
3251
+ peg$silentFails--;
3252
+ if (s7 === peg$FAILED) {
3253
+ s6 = void 0;
3254
+ } else {
3255
+ peg$currPos = s6;
3256
+ s6 = peg$FAILED;
3257
+ }
3258
+ if (s6 !== peg$FAILED) {
3259
+ s7 = input.charAt(peg$currPos);
3260
+ if (peg$r2.test(s7)) {
3261
+ peg$currPos++;
3262
+ } else {
3263
+ s7 = peg$FAILED;
3264
+ if (peg$silentFails === 0) {
3265
+ peg$fail(peg$e7);
3266
+ }
3267
+ }
3268
+ if (s7 !== peg$FAILED) {
3269
+ s6 = [s6, s7];
3270
+ s5 = s6;
3271
+ } else {
3272
+ peg$currPos = s5;
3273
+ s5 = peg$FAILED;
3274
+ }
3275
+ } else {
3276
+ peg$currPos = s5;
3277
+ s5 = peg$FAILED;
3278
+ }
3279
+ }
3280
+ while (s5 !== peg$FAILED) {
3281
+ s4.push(s5);
3282
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3283
+ s5 = peg$c16;
3284
+ peg$currPos += 4;
3285
+ } else {
3286
+ s5 = peg$FAILED;
3287
+ if (peg$silentFails === 0) {
3288
+ peg$fail(peg$e33);
3289
+ }
3290
+ }
3291
+ if (s5 === peg$FAILED) {
3292
+ s5 = peg$currPos;
3293
+ s6 = peg$currPos;
3294
+ peg$silentFails++;
3295
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3296
+ s7 = peg$c15;
3297
+ peg$currPos += 3;
3298
+ } else {
3299
+ s7 = peg$FAILED;
3300
+ if (peg$silentFails === 0) {
3301
+ peg$fail(peg$e32);
3302
+ }
3303
+ }
3304
+ peg$silentFails--;
3305
+ if (s7 === peg$FAILED) {
3306
+ s6 = void 0;
3307
+ } else {
3308
+ peg$currPos = s6;
3309
+ s6 = peg$FAILED;
3310
+ }
3311
+ if (s6 !== peg$FAILED) {
3312
+ s7 = input.charAt(peg$currPos);
3313
+ if (peg$r2.test(s7)) {
3314
+ peg$currPos++;
3315
+ } else {
3316
+ s7 = peg$FAILED;
3317
+ if (peg$silentFails === 0) {
3318
+ peg$fail(peg$e7);
3319
+ }
3320
+ }
3321
+ if (s7 !== peg$FAILED) {
3322
+ s6 = [s6, s7];
3323
+ s5 = s6;
3324
+ } else {
3325
+ peg$currPos = s5;
3326
+ s5 = peg$FAILED;
3327
+ }
3328
+ } else {
3329
+ peg$currPos = s5;
3330
+ s5 = peg$FAILED;
3331
+ }
3332
+ }
3333
+ }
3334
+ if (input.charCodeAt(peg$currPos) === 10) {
3335
+ s5 = peg$c0;
3336
+ peg$currPos++;
3337
+ } else {
3338
+ s5 = peg$FAILED;
3339
+ if (peg$silentFails === 0) {
3340
+ peg$fail(peg$e0);
3341
+ }
3342
+ }
3343
+ if (s5 !== peg$FAILED) {
3344
+ s4 = [s4, s5];
3345
+ s3 = s4;
3346
+ } else {
3347
+ peg$currPos = s3;
3348
+ s3 = peg$FAILED;
3349
+ }
3350
+ if (s3 !== peg$FAILED) {
3351
+ while (s3 !== peg$FAILED) {
3352
+ s2.push(s3);
3353
+ s3 = peg$currPos;
3354
+ s4 = [];
3355
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3356
+ s5 = peg$c16;
3357
+ peg$currPos += 4;
3358
+ } else {
3359
+ s5 = peg$FAILED;
3360
+ if (peg$silentFails === 0) {
3361
+ peg$fail(peg$e33);
3362
+ }
3363
+ }
3364
+ if (s5 === peg$FAILED) {
3365
+ s5 = peg$currPos;
3366
+ s6 = peg$currPos;
3367
+ peg$silentFails++;
3368
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3369
+ s7 = peg$c15;
3370
+ peg$currPos += 3;
3371
+ } else {
3372
+ s7 = peg$FAILED;
3373
+ if (peg$silentFails === 0) {
3374
+ peg$fail(peg$e32);
3375
+ }
3376
+ }
3377
+ peg$silentFails--;
3378
+ if (s7 === peg$FAILED) {
3379
+ s6 = void 0;
3380
+ } else {
3381
+ peg$currPos = s6;
3382
+ s6 = peg$FAILED;
3383
+ }
3384
+ if (s6 !== peg$FAILED) {
3385
+ s7 = input.charAt(peg$currPos);
3386
+ if (peg$r2.test(s7)) {
3387
+ peg$currPos++;
3388
+ } else {
3389
+ s7 = peg$FAILED;
3390
+ if (peg$silentFails === 0) {
3391
+ peg$fail(peg$e7);
3392
+ }
3393
+ }
3394
+ if (s7 !== peg$FAILED) {
3395
+ s6 = [s6, s7];
3396
+ s5 = s6;
3397
+ } else {
3398
+ peg$currPos = s5;
3399
+ s5 = peg$FAILED;
3400
+ }
3401
+ } else {
3402
+ peg$currPos = s5;
3403
+ s5 = peg$FAILED;
3404
+ }
3405
+ }
3406
+ while (s5 !== peg$FAILED) {
3407
+ s4.push(s5);
3408
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3409
+ s5 = peg$c16;
3410
+ peg$currPos += 4;
3411
+ } else {
3412
+ s5 = peg$FAILED;
3413
+ if (peg$silentFails === 0) {
3414
+ peg$fail(peg$e33);
3415
+ }
3416
+ }
3417
+ if (s5 === peg$FAILED) {
3418
+ s5 = peg$currPos;
3419
+ s6 = peg$currPos;
3420
+ peg$silentFails++;
3421
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3422
+ s7 = peg$c15;
3423
+ peg$currPos += 3;
3424
+ } else {
3425
+ s7 = peg$FAILED;
3426
+ if (peg$silentFails === 0) {
3427
+ peg$fail(peg$e32);
3428
+ }
3429
+ }
3430
+ peg$silentFails--;
3431
+ if (s7 === peg$FAILED) {
3432
+ s6 = void 0;
3433
+ } else {
3434
+ peg$currPos = s6;
3435
+ s6 = peg$FAILED;
3436
+ }
3437
+ if (s6 !== peg$FAILED) {
3438
+ s7 = input.charAt(peg$currPos);
3439
+ if (peg$r2.test(s7)) {
3440
+ peg$currPos++;
3441
+ } else {
3442
+ s7 = peg$FAILED;
3443
+ if (peg$silentFails === 0) {
3444
+ peg$fail(peg$e7);
3445
+ }
3446
+ }
3447
+ if (s7 !== peg$FAILED) {
3448
+ s6 = [s6, s7];
3449
+ s5 = s6;
3450
+ } else {
3451
+ peg$currPos = s5;
3452
+ s5 = peg$FAILED;
3453
+ }
3454
+ } else {
3455
+ peg$currPos = s5;
3456
+ s5 = peg$FAILED;
3457
+ }
3458
+ }
3459
+ }
3460
+ if (input.charCodeAt(peg$currPos) === 10) {
3461
+ s5 = peg$c0;
3462
+ peg$currPos++;
3463
+ } else {
3464
+ s5 = peg$FAILED;
3465
+ if (peg$silentFails === 0) {
3466
+ peg$fail(peg$e0);
3467
+ }
3468
+ }
3469
+ if (s5 !== peg$FAILED) {
3470
+ s4 = [s4, s5];
3471
+ s3 = s4;
3472
+ } else {
3473
+ peg$currPos = s3;
3474
+ s3 = peg$FAILED;
3475
+ }
3476
+ }
3477
+ } else {
3478
+ s2 = peg$FAILED;
3479
+ }
3480
+ if (s2 !== peg$FAILED) {
3481
+ s3 = [];
3482
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3483
+ s4 = peg$c16;
3484
+ peg$currPos += 4;
3485
+ } else {
3486
+ s4 = peg$FAILED;
3487
+ if (peg$silentFails === 0) {
3488
+ peg$fail(peg$e33);
3489
+ }
3490
+ }
3491
+ if (s4 === peg$FAILED) {
3492
+ s4 = peg$currPos;
3493
+ s5 = peg$currPos;
3494
+ peg$silentFails++;
3495
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3496
+ s6 = peg$c15;
3497
+ peg$currPos += 3;
3498
+ } else {
3499
+ s6 = peg$FAILED;
3500
+ if (peg$silentFails === 0) {
3501
+ peg$fail(peg$e32);
3502
+ }
3503
+ }
3504
+ peg$silentFails--;
3505
+ if (s6 === peg$FAILED) {
3506
+ s5 = void 0;
3507
+ } else {
3508
+ peg$currPos = s5;
3509
+ s5 = peg$FAILED;
3510
+ }
3511
+ if (s5 !== peg$FAILED) {
3512
+ s6 = input.charAt(peg$currPos);
3513
+ if (peg$r2.test(s6)) {
3514
+ peg$currPos++;
3515
+ } else {
3516
+ s6 = peg$FAILED;
3517
+ if (peg$silentFails === 0) {
3518
+ peg$fail(peg$e7);
3519
+ }
3520
+ }
3521
+ if (s6 !== peg$FAILED) {
3522
+ s5 = [s5, s6];
3523
+ s4 = s5;
3524
+ } else {
3525
+ peg$currPos = s4;
3526
+ s4 = peg$FAILED;
3527
+ }
3528
+ } else {
3529
+ peg$currPos = s4;
3530
+ s4 = peg$FAILED;
3531
+ }
3532
+ }
3533
+ while (s4 !== peg$FAILED) {
3534
+ s3.push(s4);
3535
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3536
+ s4 = peg$c16;
3537
+ peg$currPos += 4;
3538
+ } else {
3539
+ s4 = peg$FAILED;
3540
+ if (peg$silentFails === 0) {
3541
+ peg$fail(peg$e33);
3542
+ }
3543
+ }
3544
+ if (s4 === peg$FAILED) {
3545
+ s4 = peg$currPos;
3546
+ s5 = peg$currPos;
3547
+ peg$silentFails++;
3548
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3549
+ s6 = peg$c15;
3550
+ peg$currPos += 3;
3551
+ } else {
3552
+ s6 = peg$FAILED;
3553
+ if (peg$silentFails === 0) {
3554
+ peg$fail(peg$e32);
3555
+ }
3556
+ }
3557
+ peg$silentFails--;
3558
+ if (s6 === peg$FAILED) {
3559
+ s5 = void 0;
3560
+ } else {
3561
+ peg$currPos = s5;
3562
+ s5 = peg$FAILED;
3563
+ }
3564
+ if (s5 !== peg$FAILED) {
3565
+ s6 = input.charAt(peg$currPos);
3566
+ if (peg$r2.test(s6)) {
3567
+ peg$currPos++;
3568
+ } else {
3569
+ s6 = peg$FAILED;
3570
+ if (peg$silentFails === 0) {
3571
+ peg$fail(peg$e7);
3572
+ }
3573
+ }
3574
+ if (s6 !== peg$FAILED) {
3575
+ s5 = [s5, s6];
3576
+ s4 = s5;
3577
+ } else {
3578
+ peg$currPos = s4;
3579
+ s4 = peg$FAILED;
3580
+ }
3581
+ } else {
3582
+ peg$currPos = s4;
3583
+ s4 = peg$FAILED;
3584
+ }
3585
+ }
3586
+ }
3587
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3588
+ s4 = peg$c15;
3589
+ peg$currPos += 3;
3590
+ } else {
3591
+ s4 = peg$FAILED;
3592
+ if (peg$silentFails === 0) {
3593
+ peg$fail(peg$e32);
3594
+ }
3595
+ }
3596
+ if (s4 !== peg$FAILED) {
3597
+ peg$savedPos = s0;
3598
+ s0 = peg$f22(s1);
3599
+ } else {
3600
+ peg$currPos = s0;
3601
+ s0 = peg$FAILED;
3602
+ }
3603
+ } else {
3604
+ peg$currPos = s0;
3605
+ s0 = peg$FAILED;
3606
+ }
3607
+ } else {
3608
+ peg$currPos = s0;
3609
+ s0 = peg$FAILED;
3610
+ }
3611
+ return s0;
3612
+ }
3613
+ __name(peg$parsetripleBQuotedMultiLineString, "peg$parsetripleBQuotedMultiLineString");
3614
+ function peg$parse_n() {
3615
+ var s0, s1;
3616
+ if (input.charCodeAt(peg$currPos) === 10) {
3617
+ s0 = peg$c0;
3618
+ peg$currPos++;
3619
+ } else {
3620
+ s0 = peg$FAILED;
3621
+ if (peg$silentFails === 0) {
3622
+ peg$fail(peg$e0);
3623
+ }
3624
+ }
3625
+ if (s0 === peg$FAILED) {
3626
+ s0 = peg$currPos;
3627
+ peg$silentFails++;
3628
+ if (input.length > peg$currPos) {
3629
+ s1 = input.charAt(peg$currPos);
3630
+ peg$currPos++;
3631
+ } else {
3632
+ s1 = peg$FAILED;
3633
+ if (peg$silentFails === 0) {
3634
+ peg$fail(peg$e34);
3635
+ }
3636
+ }
3637
+ peg$silentFails--;
3638
+ if (s1 === peg$FAILED) {
3639
+ s0 = void 0;
3640
+ } else {
3641
+ peg$currPos = s0;
3642
+ s0 = peg$FAILED;
3643
+ }
3644
+ }
3645
+ return s0;
3646
+ }
3647
+ __name(peg$parse_n, "peg$parse_n");
3648
+ function peg$parse_() {
3649
+ var s0, s1;
3650
+ s0 = [];
3651
+ s1 = input.charAt(peg$currPos);
3652
+ if (peg$r17.test(s1)) {
3653
+ peg$currPos++;
3654
+ } else {
3655
+ s1 = peg$FAILED;
3656
+ if (peg$silentFails === 0) {
3657
+ peg$fail(peg$e35);
3658
+ }
3659
+ }
3660
+ while (s1 !== peg$FAILED) {
3661
+ s0.push(s1);
3662
+ s1 = input.charAt(peg$currPos);
3663
+ if (peg$r17.test(s1)) {
3664
+ peg$currPos++;
3665
+ } else {
3666
+ s1 = peg$FAILED;
3667
+ if (peg$silentFails === 0) {
3668
+ peg$fail(peg$e35);
3669
+ }
3670
+ }
3671
+ }
3672
+ return s0;
3673
+ }
3674
+ __name(peg$parse_, "peg$parse_");
3675
+ function peg$parse__() {
3676
+ var s0, s1;
3677
+ s0 = [];
3678
+ s1 = input.charAt(peg$currPos);
3679
+ if (peg$r17.test(s1)) {
3680
+ peg$currPos++;
3681
+ } else {
3682
+ s1 = peg$FAILED;
3683
+ if (peg$silentFails === 0) {
3684
+ peg$fail(peg$e35);
3685
+ }
3686
+ }
3687
+ if (s1 !== peg$FAILED) {
3688
+ while (s1 !== peg$FAILED) {
3689
+ s0.push(s1);
3690
+ s1 = input.charAt(peg$currPos);
3691
+ if (peg$r17.test(s1)) {
3692
+ peg$currPos++;
3693
+ } else {
3694
+ s1 = peg$FAILED;
3695
+ if (peg$silentFails === 0) {
3696
+ peg$fail(peg$e35);
3697
+ }
3698
+ }
3699
+ }
3700
+ } else {
3701
+ s0 = peg$FAILED;
3702
+ }
3703
+ return s0;
3704
+ }
3705
+ __name(peg$parse__, "peg$parse__");
3706
+ peg$result = peg$startRuleFunction();
3707
+ if (options.peg$library) {
3708
+ return (
3709
+ /** @type {any} */
3710
+ {
3711
+ peg$result,
3712
+ peg$currPos,
3713
+ peg$FAILED,
3714
+ peg$maxFailExpected,
3715
+ peg$maxFailPos
3716
+ }
3717
+ );
3718
+ }
3719
+ if (peg$result !== peg$FAILED && peg$currPos === input.length) {
3720
+ return peg$result;
3721
+ } else {
3722
+ if (peg$result !== peg$FAILED && peg$currPos < input.length) {
3723
+ peg$fail(peg$endExpectation());
3724
+ }
3725
+ throw peg$buildStructuredError(
3726
+ peg$maxFailExpected,
3727
+ peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,
3728
+ peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
3729
+ );
3730
+ }
3731
+ }
3732
+ __name(peg$parse, "peg$parse");
3733
+
3734
+ // src/index.ts
3735
+ function parseEnvSpecDotEnvFile(source) {
3736
+ return peg$parse(source);
3737
+ }
3738
+ __name(parseEnvSpecDotEnvFile, "parseEnvSpecDotEnvFile");
3739
+
3740
+ export { envSpecUpdater, parseEnvSpecDotEnvFile };
3741
+ //# sourceMappingURL=index.mjs.map
3742
+ //# sourceMappingURL=index.mjs.map