@env-spec/parser 0.0.0 → 0.0.2

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,3703 @@
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
+ if (s3 === peg$FAILED) {
1646
+ s3 = peg$parseFunctionArgValue();
1647
+ }
1648
+ while (s3 !== peg$FAILED) {
1649
+ s2.push(s3);
1650
+ s3 = peg$currPos;
1651
+ s4 = peg$currPos;
1652
+ s5 = peg$parse_();
1653
+ if (input.charCodeAt(peg$currPos) === 44) {
1654
+ s6 = peg$c9;
1655
+ peg$currPos++;
1656
+ } else {
1657
+ s6 = peg$FAILED;
1658
+ if (peg$silentFails === 0) {
1659
+ peg$fail(peg$e15);
1660
+ }
1661
+ }
1662
+ if (s6 !== peg$FAILED) {
1663
+ s7 = peg$parse_();
1664
+ s5 = [s5, s6, s7];
1665
+ s4 = s5;
1666
+ } else {
1667
+ peg$currPos = s4;
1668
+ s4 = peg$FAILED;
1669
+ }
1670
+ if (s4 !== peg$FAILED) {
1671
+ s4 = peg$currPos;
1672
+ s5 = peg$parseFunctionArgKeyName();
1673
+ if (s5 !== peg$FAILED) {
1674
+ if (input.charCodeAt(peg$currPos) === 61) {
1675
+ s6 = peg$c2;
1676
+ peg$currPos++;
1677
+ } else {
1678
+ s6 = peg$FAILED;
1679
+ if (peg$silentFails === 0) {
1680
+ peg$fail(peg$e2);
1681
+ }
1682
+ }
1683
+ if (s6 !== peg$FAILED) {
1684
+ s7 = peg$parseFunctionArgValue();
1685
+ if (s7 !== peg$FAILED) {
1686
+ peg$savedPos = s4;
1687
+ s4 = peg$f10(s5, s7);
1688
+ } else {
1689
+ peg$currPos = s4;
1690
+ s4 = peg$FAILED;
1691
+ }
1692
+ } else {
1693
+ peg$currPos = s4;
1694
+ s4 = peg$FAILED;
1695
+ }
1696
+ } else {
1697
+ peg$currPos = s4;
1698
+ s4 = peg$FAILED;
1699
+ }
1700
+ if (s4 === peg$FAILED) {
1701
+ s4 = peg$parseFunctionArgValue();
1702
+ }
1703
+ if (s4 === peg$FAILED) {
1704
+ peg$currPos = s3;
1705
+ s3 = peg$FAILED;
1706
+ } else {
1707
+ s3 = s4;
1708
+ }
1709
+ } else {
1710
+ s3 = s4;
1711
+ }
1712
+ }
1713
+ if (s2.length < 1) {
1714
+ peg$currPos = s1;
1715
+ s1 = peg$FAILED;
1716
+ } else {
1717
+ s1 = s2;
1718
+ }
1719
+ if (s1 !== peg$FAILED) {
1720
+ peg$savedPos = s0;
1721
+ s1 = peg$f11(s1);
1722
+ }
1723
+ s0 = s1;
1724
+ return s0;
1725
+ }
1726
+ __name(peg$parseFunctionArgs, "peg$parseFunctionArgs");
1727
+ function peg$parseFunctionArgKeyName() {
1728
+ var s0, s1, s2, s3, s4;
1729
+ s0 = peg$currPos;
1730
+ s1 = peg$currPos;
1731
+ s2 = input.charAt(peg$currPos);
1732
+ if (peg$r3.test(s2)) {
1733
+ peg$currPos++;
1734
+ } else {
1735
+ s2 = peg$FAILED;
1736
+ if (peg$silentFails === 0) {
1737
+ peg$fail(peg$e8);
1738
+ }
1739
+ }
1740
+ if (s2 !== peg$FAILED) {
1741
+ s3 = [];
1742
+ s4 = input.charAt(peg$currPos);
1743
+ if (peg$r5.test(s4)) {
1744
+ peg$currPos++;
1745
+ } else {
1746
+ s4 = peg$FAILED;
1747
+ if (peg$silentFails === 0) {
1748
+ peg$fail(peg$e14);
1749
+ }
1750
+ }
1751
+ while (s4 !== peg$FAILED) {
1752
+ s3.push(s4);
1753
+ s4 = input.charAt(peg$currPos);
1754
+ if (peg$r5.test(s4)) {
1755
+ peg$currPos++;
1756
+ } else {
1757
+ s4 = peg$FAILED;
1758
+ if (peg$silentFails === 0) {
1759
+ peg$fail(peg$e14);
1760
+ }
1761
+ }
1762
+ }
1763
+ s2 = [s2, s3];
1764
+ s1 = s2;
1765
+ } else {
1766
+ peg$currPos = s1;
1767
+ s1 = peg$FAILED;
1768
+ }
1769
+ if (s1 !== peg$FAILED) {
1770
+ s0 = input.substring(s0, peg$currPos);
1771
+ } else {
1772
+ s0 = s1;
1773
+ }
1774
+ return s0;
1775
+ }
1776
+ __name(peg$parseFunctionArgKeyName, "peg$parseFunctionArgKeyName");
1777
+ function peg$parseFunctionArgValue() {
1778
+ var s0, s1, s2, s3;
1779
+ s0 = peg$parseFunctionCall();
1780
+ if (s0 === peg$FAILED) {
1781
+ s0 = peg$parsequotedString();
1782
+ if (s0 === peg$FAILED) {
1783
+ s0 = peg$currPos;
1784
+ s1 = peg$currPos;
1785
+ s2 = [];
1786
+ s3 = input.charAt(peg$currPos);
1787
+ if (peg$r6.test(s3)) {
1788
+ peg$currPos++;
1789
+ } else {
1790
+ s3 = peg$FAILED;
1791
+ if (peg$silentFails === 0) {
1792
+ peg$fail(peg$e16);
1793
+ }
1794
+ }
1795
+ if (s3 !== peg$FAILED) {
1796
+ while (s3 !== peg$FAILED) {
1797
+ s2.push(s3);
1798
+ s3 = input.charAt(peg$currPos);
1799
+ if (peg$r6.test(s3)) {
1800
+ peg$currPos++;
1801
+ } else {
1802
+ s3 = peg$FAILED;
1803
+ if (peg$silentFails === 0) {
1804
+ peg$fail(peg$e16);
1805
+ }
1806
+ }
1807
+ }
1808
+ } else {
1809
+ s2 = peg$FAILED;
1810
+ }
1811
+ if (s2 !== peg$FAILED) {
1812
+ s1 = input.substring(s1, peg$currPos);
1813
+ } else {
1814
+ s1 = s2;
1815
+ }
1816
+ if (s1 !== peg$FAILED) {
1817
+ peg$savedPos = s0;
1818
+ s1 = peg$f12();
1819
+ }
1820
+ s0 = s1;
1821
+ }
1822
+ }
1823
+ return s0;
1824
+ }
1825
+ __name(peg$parseFunctionArgValue, "peg$parseFunctionArgValue");
1826
+ function peg$parseDivider() {
1827
+ var s0, s1, s2, s3, s4, s5, s6, s7;
1828
+ s0 = peg$currPos;
1829
+ if (input.charCodeAt(peg$currPos) === 35) {
1830
+ s1 = peg$c3;
1831
+ peg$currPos++;
1832
+ } else {
1833
+ s1 = peg$FAILED;
1834
+ if (peg$silentFails === 0) {
1835
+ peg$fail(peg$e5);
1836
+ }
1837
+ }
1838
+ if (s1 !== peg$FAILED) {
1839
+ s2 = peg$currPos;
1840
+ s3 = peg$parse_();
1841
+ s2 = input.substring(s2, peg$currPos);
1842
+ s3 = peg$currPos;
1843
+ s4 = peg$currPos;
1844
+ s5 = peg$currPos;
1845
+ s6 = [];
1846
+ s7 = input.charAt(peg$currPos);
1847
+ if (peg$r7.test(s7)) {
1848
+ peg$currPos++;
1849
+ } else {
1850
+ s7 = peg$FAILED;
1851
+ if (peg$silentFails === 0) {
1852
+ peg$fail(peg$e17);
1853
+ }
1854
+ }
1855
+ while (s7 !== peg$FAILED) {
1856
+ s6.push(s7);
1857
+ s7 = input.charAt(peg$currPos);
1858
+ if (peg$r7.test(s7)) {
1859
+ peg$currPos++;
1860
+ } else {
1861
+ s7 = peg$FAILED;
1862
+ if (peg$silentFails === 0) {
1863
+ peg$fail(peg$e17);
1864
+ }
1865
+ }
1866
+ }
1867
+ if (s6.length < 3) {
1868
+ peg$currPos = s5;
1869
+ s5 = peg$FAILED;
1870
+ } else {
1871
+ s5 = s6;
1872
+ }
1873
+ if (s5 !== peg$FAILED) {
1874
+ s6 = [];
1875
+ s7 = input.charAt(peg$currPos);
1876
+ if (peg$r2.test(s7)) {
1877
+ peg$currPos++;
1878
+ } else {
1879
+ s7 = peg$FAILED;
1880
+ if (peg$silentFails === 0) {
1881
+ peg$fail(peg$e7);
1882
+ }
1883
+ }
1884
+ while (s7 !== peg$FAILED) {
1885
+ s6.push(s7);
1886
+ s7 = input.charAt(peg$currPos);
1887
+ if (peg$r2.test(s7)) {
1888
+ peg$currPos++;
1889
+ } else {
1890
+ s7 = peg$FAILED;
1891
+ if (peg$silentFails === 0) {
1892
+ peg$fail(peg$e7);
1893
+ }
1894
+ }
1895
+ }
1896
+ s5 = [s5, s6];
1897
+ s4 = s5;
1898
+ } else {
1899
+ peg$currPos = s4;
1900
+ s4 = peg$FAILED;
1901
+ }
1902
+ if (s4 !== peg$FAILED) {
1903
+ s3 = input.substring(s3, peg$currPos);
1904
+ } else {
1905
+ s3 = s4;
1906
+ }
1907
+ if (s3 !== peg$FAILED) {
1908
+ s4 = peg$parse_n();
1909
+ if (s4 !== peg$FAILED) {
1910
+ peg$savedPos = s0;
1911
+ s0 = peg$f13(s2, s3);
1912
+ } else {
1913
+ peg$currPos = s0;
1914
+ s0 = peg$FAILED;
1915
+ }
1916
+ } else {
1917
+ peg$currPos = s0;
1918
+ s0 = peg$FAILED;
1919
+ }
1920
+ } else {
1921
+ peg$currPos = s0;
1922
+ s0 = peg$FAILED;
1923
+ }
1924
+ return s0;
1925
+ }
1926
+ __name(peg$parseDivider, "peg$parseDivider");
1927
+ function peg$parseunquotedString() {
1928
+ var s0, s1, s2, s3, s4, s5, s6;
1929
+ s0 = peg$currPos;
1930
+ s1 = peg$currPos;
1931
+ s2 = peg$currPos;
1932
+ s3 = peg$parse_();
1933
+ s4 = peg$currPos;
1934
+ peg$silentFails++;
1935
+ s5 = input.charAt(peg$currPos);
1936
+ if (peg$r8.test(s5)) {
1937
+ peg$currPos++;
1938
+ } else {
1939
+ s5 = peg$FAILED;
1940
+ if (peg$silentFails === 0) {
1941
+ peg$fail(peg$e18);
1942
+ }
1943
+ }
1944
+ peg$silentFails--;
1945
+ if (s5 === peg$FAILED) {
1946
+ s4 = void 0;
1947
+ } else {
1948
+ peg$currPos = s4;
1949
+ s4 = peg$FAILED;
1950
+ }
1951
+ if (s4 !== peg$FAILED) {
1952
+ s5 = [];
1953
+ s6 = input.charAt(peg$currPos);
1954
+ if (peg$r9.test(s6)) {
1955
+ peg$currPos++;
1956
+ } else {
1957
+ s6 = peg$FAILED;
1958
+ if (peg$silentFails === 0) {
1959
+ peg$fail(peg$e19);
1960
+ }
1961
+ }
1962
+ if (s6 !== peg$FAILED) {
1963
+ while (s6 !== peg$FAILED) {
1964
+ s5.push(s6);
1965
+ s6 = input.charAt(peg$currPos);
1966
+ if (peg$r9.test(s6)) {
1967
+ peg$currPos++;
1968
+ } else {
1969
+ s6 = peg$FAILED;
1970
+ if (peg$silentFails === 0) {
1971
+ peg$fail(peg$e19);
1972
+ }
1973
+ }
1974
+ }
1975
+ } else {
1976
+ s5 = peg$FAILED;
1977
+ }
1978
+ if (s5 !== peg$FAILED) {
1979
+ s3 = [s3, s4, s5];
1980
+ s2 = s3;
1981
+ } else {
1982
+ peg$currPos = s2;
1983
+ s2 = peg$FAILED;
1984
+ }
1985
+ } else {
1986
+ peg$currPos = s2;
1987
+ s2 = peg$FAILED;
1988
+ }
1989
+ if (s2 !== peg$FAILED) {
1990
+ s1 = input.substring(s1, peg$currPos);
1991
+ } else {
1992
+ s1 = s2;
1993
+ }
1994
+ if (s1 !== peg$FAILED) {
1995
+ peg$savedPos = s0;
1996
+ s1 = peg$f14();
1997
+ }
1998
+ s0 = s1;
1999
+ return s0;
2000
+ }
2001
+ __name(peg$parseunquotedString, "peg$parseunquotedString");
2002
+ function peg$parseunquotedStringWithoutSpaces() {
2003
+ var s0, s1, s2, s3, s4, s5;
2004
+ s0 = peg$currPos;
2005
+ s1 = peg$currPos;
2006
+ s2 = peg$currPos;
2007
+ s3 = peg$currPos;
2008
+ peg$silentFails++;
2009
+ s4 = input.charAt(peg$currPos);
2010
+ if (peg$r8.test(s4)) {
2011
+ peg$currPos++;
2012
+ } else {
2013
+ s4 = peg$FAILED;
2014
+ if (peg$silentFails === 0) {
2015
+ peg$fail(peg$e18);
2016
+ }
2017
+ }
2018
+ peg$silentFails--;
2019
+ if (s4 === peg$FAILED) {
2020
+ s3 = void 0;
2021
+ } else {
2022
+ peg$currPos = s3;
2023
+ s3 = peg$FAILED;
2024
+ }
2025
+ if (s3 !== peg$FAILED) {
2026
+ s4 = [];
2027
+ s5 = input.charAt(peg$currPos);
2028
+ if (peg$r10.test(s5)) {
2029
+ peg$currPos++;
2030
+ } else {
2031
+ s5 = peg$FAILED;
2032
+ if (peg$silentFails === 0) {
2033
+ peg$fail(peg$e20);
2034
+ }
2035
+ }
2036
+ if (s5 !== peg$FAILED) {
2037
+ while (s5 !== peg$FAILED) {
2038
+ s4.push(s5);
2039
+ s5 = input.charAt(peg$currPos);
2040
+ if (peg$r10.test(s5)) {
2041
+ peg$currPos++;
2042
+ } else {
2043
+ s5 = peg$FAILED;
2044
+ if (peg$silentFails === 0) {
2045
+ peg$fail(peg$e20);
2046
+ }
2047
+ }
2048
+ }
2049
+ } else {
2050
+ s4 = peg$FAILED;
2051
+ }
2052
+ if (s4 !== peg$FAILED) {
2053
+ s3 = [s3, s4];
2054
+ s2 = s3;
2055
+ } else {
2056
+ peg$currPos = s2;
2057
+ s2 = peg$FAILED;
2058
+ }
2059
+ } else {
2060
+ peg$currPos = s2;
2061
+ s2 = peg$FAILED;
2062
+ }
2063
+ if (s2 !== peg$FAILED) {
2064
+ s1 = input.substring(s1, peg$currPos);
2065
+ } else {
2066
+ s1 = s2;
2067
+ }
2068
+ if (s1 !== peg$FAILED) {
2069
+ peg$savedPos = s0;
2070
+ s1 = peg$f15();
2071
+ }
2072
+ s0 = s1;
2073
+ return s0;
2074
+ }
2075
+ __name(peg$parseunquotedStringWithoutSpaces, "peg$parseunquotedStringWithoutSpaces");
2076
+ function peg$parsequotedString() {
2077
+ var s0;
2078
+ s0 = peg$parseDQuotedString();
2079
+ if (s0 === peg$FAILED) {
2080
+ s0 = peg$parseSQuotedString();
2081
+ if (s0 === peg$FAILED) {
2082
+ s0 = peg$parseBQuotedString();
2083
+ }
2084
+ }
2085
+ return s0;
2086
+ }
2087
+ __name(peg$parsequotedString, "peg$parsequotedString");
2088
+ function peg$parseDQuotedString() {
2089
+ var s0, s1, s2, s3;
2090
+ s0 = peg$currPos;
2091
+ s1 = input.charAt(peg$currPos);
2092
+ if (peg$r11.test(s1)) {
2093
+ peg$currPos++;
2094
+ } else {
2095
+ s1 = peg$FAILED;
2096
+ if (peg$silentFails === 0) {
2097
+ peg$fail(peg$e21);
2098
+ }
2099
+ }
2100
+ if (s1 !== peg$FAILED) {
2101
+ s2 = [];
2102
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2103
+ s3 = peg$c10;
2104
+ peg$currPos += 2;
2105
+ } else {
2106
+ s3 = peg$FAILED;
2107
+ if (peg$silentFails === 0) {
2108
+ peg$fail(peg$e22);
2109
+ }
2110
+ }
2111
+ if (s3 === peg$FAILED) {
2112
+ s3 = input.charAt(peg$currPos);
2113
+ if (peg$r12.test(s3)) {
2114
+ peg$currPos++;
2115
+ } else {
2116
+ s3 = peg$FAILED;
2117
+ if (peg$silentFails === 0) {
2118
+ peg$fail(peg$e23);
2119
+ }
2120
+ }
2121
+ }
2122
+ while (s3 !== peg$FAILED) {
2123
+ s2.push(s3);
2124
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2125
+ s3 = peg$c10;
2126
+ peg$currPos += 2;
2127
+ } else {
2128
+ s3 = peg$FAILED;
2129
+ if (peg$silentFails === 0) {
2130
+ peg$fail(peg$e22);
2131
+ }
2132
+ }
2133
+ if (s3 === peg$FAILED) {
2134
+ s3 = input.charAt(peg$currPos);
2135
+ if (peg$r12.test(s3)) {
2136
+ peg$currPos++;
2137
+ } else {
2138
+ s3 = peg$FAILED;
2139
+ if (peg$silentFails === 0) {
2140
+ peg$fail(peg$e23);
2141
+ }
2142
+ }
2143
+ }
2144
+ }
2145
+ s3 = input.charAt(peg$currPos);
2146
+ if (peg$r11.test(s3)) {
2147
+ peg$currPos++;
2148
+ } else {
2149
+ s3 = peg$FAILED;
2150
+ if (peg$silentFails === 0) {
2151
+ peg$fail(peg$e21);
2152
+ }
2153
+ }
2154
+ if (s3 !== peg$FAILED) {
2155
+ peg$savedPos = s0;
2156
+ s0 = peg$f16(s1);
2157
+ } else {
2158
+ peg$currPos = s0;
2159
+ s0 = peg$FAILED;
2160
+ }
2161
+ } else {
2162
+ peg$currPos = s0;
2163
+ s0 = peg$FAILED;
2164
+ }
2165
+ return s0;
2166
+ }
2167
+ __name(peg$parseDQuotedString, "peg$parseDQuotedString");
2168
+ function peg$parseSQuotedString() {
2169
+ var s0, s1, s2, s3;
2170
+ s0 = peg$currPos;
2171
+ s1 = input.charAt(peg$currPos);
2172
+ if (peg$r13.test(s1)) {
2173
+ peg$currPos++;
2174
+ } else {
2175
+ s1 = peg$FAILED;
2176
+ if (peg$silentFails === 0) {
2177
+ peg$fail(peg$e24);
2178
+ }
2179
+ }
2180
+ if (s1 !== peg$FAILED) {
2181
+ s2 = [];
2182
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2183
+ s3 = peg$c11;
2184
+ peg$currPos += 2;
2185
+ } else {
2186
+ s3 = peg$FAILED;
2187
+ if (peg$silentFails === 0) {
2188
+ peg$fail(peg$e25);
2189
+ }
2190
+ }
2191
+ if (s3 === peg$FAILED) {
2192
+ s3 = input.charAt(peg$currPos);
2193
+ if (peg$r14.test(s3)) {
2194
+ peg$currPos++;
2195
+ } else {
2196
+ s3 = peg$FAILED;
2197
+ if (peg$silentFails === 0) {
2198
+ peg$fail(peg$e26);
2199
+ }
2200
+ }
2201
+ }
2202
+ while (s3 !== peg$FAILED) {
2203
+ s2.push(s3);
2204
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2205
+ s3 = peg$c11;
2206
+ peg$currPos += 2;
2207
+ } else {
2208
+ s3 = peg$FAILED;
2209
+ if (peg$silentFails === 0) {
2210
+ peg$fail(peg$e25);
2211
+ }
2212
+ }
2213
+ if (s3 === peg$FAILED) {
2214
+ s3 = input.charAt(peg$currPos);
2215
+ if (peg$r14.test(s3)) {
2216
+ peg$currPos++;
2217
+ } else {
2218
+ s3 = peg$FAILED;
2219
+ if (peg$silentFails === 0) {
2220
+ peg$fail(peg$e26);
2221
+ }
2222
+ }
2223
+ }
2224
+ }
2225
+ s3 = input.charAt(peg$currPos);
2226
+ if (peg$r13.test(s3)) {
2227
+ peg$currPos++;
2228
+ } else {
2229
+ s3 = peg$FAILED;
2230
+ if (peg$silentFails === 0) {
2231
+ peg$fail(peg$e24);
2232
+ }
2233
+ }
2234
+ if (s3 !== peg$FAILED) {
2235
+ peg$savedPos = s0;
2236
+ s0 = peg$f17(s1);
2237
+ } else {
2238
+ peg$currPos = s0;
2239
+ s0 = peg$FAILED;
2240
+ }
2241
+ } else {
2242
+ peg$currPos = s0;
2243
+ s0 = peg$FAILED;
2244
+ }
2245
+ return s0;
2246
+ }
2247
+ __name(peg$parseSQuotedString, "peg$parseSQuotedString");
2248
+ function peg$parseBQuotedString() {
2249
+ var s0, s1, s2, s3;
2250
+ s0 = peg$currPos;
2251
+ s1 = input.charAt(peg$currPos);
2252
+ if (peg$r15.test(s1)) {
2253
+ peg$currPos++;
2254
+ } else {
2255
+ s1 = peg$FAILED;
2256
+ if (peg$silentFails === 0) {
2257
+ peg$fail(peg$e27);
2258
+ }
2259
+ }
2260
+ if (s1 !== peg$FAILED) {
2261
+ s2 = [];
2262
+ if (input.substr(peg$currPos, 2) === peg$c12) {
2263
+ s3 = peg$c12;
2264
+ peg$currPos += 2;
2265
+ } else {
2266
+ s3 = peg$FAILED;
2267
+ if (peg$silentFails === 0) {
2268
+ peg$fail(peg$e28);
2269
+ }
2270
+ }
2271
+ if (s3 === peg$FAILED) {
2272
+ s3 = input.charAt(peg$currPos);
2273
+ if (peg$r16.test(s3)) {
2274
+ peg$currPos++;
2275
+ } else {
2276
+ s3 = peg$FAILED;
2277
+ if (peg$silentFails === 0) {
2278
+ peg$fail(peg$e29);
2279
+ }
2280
+ }
2281
+ }
2282
+ while (s3 !== peg$FAILED) {
2283
+ s2.push(s3);
2284
+ if (input.substr(peg$currPos, 2) === peg$c12) {
2285
+ s3 = peg$c12;
2286
+ peg$currPos += 2;
2287
+ } else {
2288
+ s3 = peg$FAILED;
2289
+ if (peg$silentFails === 0) {
2290
+ peg$fail(peg$e28);
2291
+ }
2292
+ }
2293
+ if (s3 === peg$FAILED) {
2294
+ s3 = input.charAt(peg$currPos);
2295
+ if (peg$r16.test(s3)) {
2296
+ peg$currPos++;
2297
+ } else {
2298
+ s3 = peg$FAILED;
2299
+ if (peg$silentFails === 0) {
2300
+ peg$fail(peg$e29);
2301
+ }
2302
+ }
2303
+ }
2304
+ }
2305
+ s3 = input.charAt(peg$currPos);
2306
+ if (peg$r15.test(s3)) {
2307
+ peg$currPos++;
2308
+ } else {
2309
+ s3 = peg$FAILED;
2310
+ if (peg$silentFails === 0) {
2311
+ peg$fail(peg$e27);
2312
+ }
2313
+ }
2314
+ if (s3 !== peg$FAILED) {
2315
+ peg$savedPos = s0;
2316
+ s0 = peg$f18(s1);
2317
+ } else {
2318
+ peg$currPos = s0;
2319
+ s0 = peg$FAILED;
2320
+ }
2321
+ } else {
2322
+ peg$currPos = s0;
2323
+ s0 = peg$FAILED;
2324
+ }
2325
+ return s0;
2326
+ }
2327
+ __name(peg$parseBQuotedString, "peg$parseBQuotedString");
2328
+ function peg$parsemultiLineString() {
2329
+ var s0;
2330
+ s0 = peg$parsesingleSQuotedMultiLineString();
2331
+ if (s0 === peg$FAILED) {
2332
+ s0 = peg$parsesingleDQuotedMultiLineString();
2333
+ if (s0 === peg$FAILED) {
2334
+ s0 = peg$parsetripleDQuotedMultiLineString();
2335
+ if (s0 === peg$FAILED) {
2336
+ s0 = peg$parsetripleBQuotedMultiLineString();
2337
+ }
2338
+ }
2339
+ }
2340
+ return s0;
2341
+ }
2342
+ __name(peg$parsemultiLineString, "peg$parsemultiLineString");
2343
+ function peg$parsesingleSQuotedMultiLineString() {
2344
+ var s0, s1, s2, s3, s4, s5;
2345
+ s0 = peg$currPos;
2346
+ s1 = input.charAt(peg$currPos);
2347
+ if (peg$r13.test(s1)) {
2348
+ peg$currPos++;
2349
+ } else {
2350
+ s1 = peg$FAILED;
2351
+ if (peg$silentFails === 0) {
2352
+ peg$fail(peg$e24);
2353
+ }
2354
+ }
2355
+ if (s1 !== peg$FAILED) {
2356
+ s2 = [];
2357
+ s3 = peg$currPos;
2358
+ s4 = [];
2359
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2360
+ s5 = peg$c11;
2361
+ peg$currPos += 2;
2362
+ } else {
2363
+ s5 = peg$FAILED;
2364
+ if (peg$silentFails === 0) {
2365
+ peg$fail(peg$e25);
2366
+ }
2367
+ }
2368
+ if (s5 === peg$FAILED) {
2369
+ s5 = input.charAt(peg$currPos);
2370
+ if (peg$r14.test(s5)) {
2371
+ peg$currPos++;
2372
+ } else {
2373
+ s5 = peg$FAILED;
2374
+ if (peg$silentFails === 0) {
2375
+ peg$fail(peg$e26);
2376
+ }
2377
+ }
2378
+ }
2379
+ while (s5 !== peg$FAILED) {
2380
+ s4.push(s5);
2381
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2382
+ s5 = peg$c11;
2383
+ peg$currPos += 2;
2384
+ } else {
2385
+ s5 = peg$FAILED;
2386
+ if (peg$silentFails === 0) {
2387
+ peg$fail(peg$e25);
2388
+ }
2389
+ }
2390
+ if (s5 === peg$FAILED) {
2391
+ s5 = input.charAt(peg$currPos);
2392
+ if (peg$r14.test(s5)) {
2393
+ peg$currPos++;
2394
+ } else {
2395
+ s5 = peg$FAILED;
2396
+ if (peg$silentFails === 0) {
2397
+ peg$fail(peg$e26);
2398
+ }
2399
+ }
2400
+ }
2401
+ }
2402
+ if (input.charCodeAt(peg$currPos) === 10) {
2403
+ s5 = peg$c0;
2404
+ peg$currPos++;
2405
+ } else {
2406
+ s5 = peg$FAILED;
2407
+ if (peg$silentFails === 0) {
2408
+ peg$fail(peg$e0);
2409
+ }
2410
+ }
2411
+ if (s5 !== peg$FAILED) {
2412
+ s4 = [s4, s5];
2413
+ s3 = s4;
2414
+ } else {
2415
+ peg$currPos = s3;
2416
+ s3 = peg$FAILED;
2417
+ }
2418
+ if (s3 !== peg$FAILED) {
2419
+ while (s3 !== peg$FAILED) {
2420
+ s2.push(s3);
2421
+ s3 = peg$currPos;
2422
+ s4 = [];
2423
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2424
+ s5 = peg$c11;
2425
+ peg$currPos += 2;
2426
+ } else {
2427
+ s5 = peg$FAILED;
2428
+ if (peg$silentFails === 0) {
2429
+ peg$fail(peg$e25);
2430
+ }
2431
+ }
2432
+ if (s5 === peg$FAILED) {
2433
+ s5 = input.charAt(peg$currPos);
2434
+ if (peg$r14.test(s5)) {
2435
+ peg$currPos++;
2436
+ } else {
2437
+ s5 = peg$FAILED;
2438
+ if (peg$silentFails === 0) {
2439
+ peg$fail(peg$e26);
2440
+ }
2441
+ }
2442
+ }
2443
+ while (s5 !== peg$FAILED) {
2444
+ s4.push(s5);
2445
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2446
+ s5 = peg$c11;
2447
+ peg$currPos += 2;
2448
+ } else {
2449
+ s5 = peg$FAILED;
2450
+ if (peg$silentFails === 0) {
2451
+ peg$fail(peg$e25);
2452
+ }
2453
+ }
2454
+ if (s5 === peg$FAILED) {
2455
+ s5 = input.charAt(peg$currPos);
2456
+ if (peg$r14.test(s5)) {
2457
+ peg$currPos++;
2458
+ } else {
2459
+ s5 = peg$FAILED;
2460
+ if (peg$silentFails === 0) {
2461
+ peg$fail(peg$e26);
2462
+ }
2463
+ }
2464
+ }
2465
+ }
2466
+ if (input.charCodeAt(peg$currPos) === 10) {
2467
+ s5 = peg$c0;
2468
+ peg$currPos++;
2469
+ } else {
2470
+ s5 = peg$FAILED;
2471
+ if (peg$silentFails === 0) {
2472
+ peg$fail(peg$e0);
2473
+ }
2474
+ }
2475
+ if (s5 !== peg$FAILED) {
2476
+ s4 = [s4, s5];
2477
+ s3 = s4;
2478
+ } else {
2479
+ peg$currPos = s3;
2480
+ s3 = peg$FAILED;
2481
+ }
2482
+ }
2483
+ } else {
2484
+ s2 = peg$FAILED;
2485
+ }
2486
+ if (s2 !== peg$FAILED) {
2487
+ s3 = [];
2488
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2489
+ s4 = peg$c11;
2490
+ peg$currPos += 2;
2491
+ } else {
2492
+ s4 = peg$FAILED;
2493
+ if (peg$silentFails === 0) {
2494
+ peg$fail(peg$e25);
2495
+ }
2496
+ }
2497
+ if (s4 === peg$FAILED) {
2498
+ s4 = input.charAt(peg$currPos);
2499
+ if (peg$r14.test(s4)) {
2500
+ peg$currPos++;
2501
+ } else {
2502
+ s4 = peg$FAILED;
2503
+ if (peg$silentFails === 0) {
2504
+ peg$fail(peg$e26);
2505
+ }
2506
+ }
2507
+ }
2508
+ while (s4 !== peg$FAILED) {
2509
+ s3.push(s4);
2510
+ if (input.substr(peg$currPos, 2) === peg$c11) {
2511
+ s4 = peg$c11;
2512
+ peg$currPos += 2;
2513
+ } else {
2514
+ s4 = peg$FAILED;
2515
+ if (peg$silentFails === 0) {
2516
+ peg$fail(peg$e25);
2517
+ }
2518
+ }
2519
+ if (s4 === peg$FAILED) {
2520
+ s4 = input.charAt(peg$currPos);
2521
+ if (peg$r14.test(s4)) {
2522
+ peg$currPos++;
2523
+ } else {
2524
+ s4 = peg$FAILED;
2525
+ if (peg$silentFails === 0) {
2526
+ peg$fail(peg$e26);
2527
+ }
2528
+ }
2529
+ }
2530
+ }
2531
+ s4 = input.charAt(peg$currPos);
2532
+ if (peg$r13.test(s4)) {
2533
+ peg$currPos++;
2534
+ } else {
2535
+ s4 = peg$FAILED;
2536
+ if (peg$silentFails === 0) {
2537
+ peg$fail(peg$e24);
2538
+ }
2539
+ }
2540
+ if (s4 !== peg$FAILED) {
2541
+ peg$savedPos = s0;
2542
+ s0 = peg$f19(s1);
2543
+ } else {
2544
+ peg$currPos = s0;
2545
+ s0 = peg$FAILED;
2546
+ }
2547
+ } else {
2548
+ peg$currPos = s0;
2549
+ s0 = peg$FAILED;
2550
+ }
2551
+ } else {
2552
+ peg$currPos = s0;
2553
+ s0 = peg$FAILED;
2554
+ }
2555
+ return s0;
2556
+ }
2557
+ __name(peg$parsesingleSQuotedMultiLineString, "peg$parsesingleSQuotedMultiLineString");
2558
+ function peg$parsesingleDQuotedMultiLineString() {
2559
+ var s0, s1, s2, s3, s4, s5;
2560
+ s0 = peg$currPos;
2561
+ s1 = input.charAt(peg$currPos);
2562
+ if (peg$r11.test(s1)) {
2563
+ peg$currPos++;
2564
+ } else {
2565
+ s1 = peg$FAILED;
2566
+ if (peg$silentFails === 0) {
2567
+ peg$fail(peg$e21);
2568
+ }
2569
+ }
2570
+ if (s1 !== peg$FAILED) {
2571
+ s2 = [];
2572
+ s3 = peg$currPos;
2573
+ s4 = [];
2574
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2575
+ s5 = peg$c10;
2576
+ peg$currPos += 2;
2577
+ } else {
2578
+ s5 = peg$FAILED;
2579
+ if (peg$silentFails === 0) {
2580
+ peg$fail(peg$e22);
2581
+ }
2582
+ }
2583
+ if (s5 === peg$FAILED) {
2584
+ s5 = input.charAt(peg$currPos);
2585
+ if (peg$r12.test(s5)) {
2586
+ peg$currPos++;
2587
+ } else {
2588
+ s5 = peg$FAILED;
2589
+ if (peg$silentFails === 0) {
2590
+ peg$fail(peg$e23);
2591
+ }
2592
+ }
2593
+ }
2594
+ while (s5 !== peg$FAILED) {
2595
+ s4.push(s5);
2596
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2597
+ s5 = peg$c10;
2598
+ peg$currPos += 2;
2599
+ } else {
2600
+ s5 = peg$FAILED;
2601
+ if (peg$silentFails === 0) {
2602
+ peg$fail(peg$e22);
2603
+ }
2604
+ }
2605
+ if (s5 === peg$FAILED) {
2606
+ s5 = input.charAt(peg$currPos);
2607
+ if (peg$r12.test(s5)) {
2608
+ peg$currPos++;
2609
+ } else {
2610
+ s5 = peg$FAILED;
2611
+ if (peg$silentFails === 0) {
2612
+ peg$fail(peg$e23);
2613
+ }
2614
+ }
2615
+ }
2616
+ }
2617
+ if (input.charCodeAt(peg$currPos) === 10) {
2618
+ s5 = peg$c0;
2619
+ peg$currPos++;
2620
+ } else {
2621
+ s5 = peg$FAILED;
2622
+ if (peg$silentFails === 0) {
2623
+ peg$fail(peg$e0);
2624
+ }
2625
+ }
2626
+ if (s5 !== peg$FAILED) {
2627
+ s4 = [s4, s5];
2628
+ s3 = s4;
2629
+ } else {
2630
+ peg$currPos = s3;
2631
+ s3 = peg$FAILED;
2632
+ }
2633
+ if (s3 !== peg$FAILED) {
2634
+ while (s3 !== peg$FAILED) {
2635
+ s2.push(s3);
2636
+ s3 = peg$currPos;
2637
+ s4 = [];
2638
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2639
+ s5 = peg$c10;
2640
+ peg$currPos += 2;
2641
+ } else {
2642
+ s5 = peg$FAILED;
2643
+ if (peg$silentFails === 0) {
2644
+ peg$fail(peg$e22);
2645
+ }
2646
+ }
2647
+ if (s5 === peg$FAILED) {
2648
+ s5 = input.charAt(peg$currPos);
2649
+ if (peg$r12.test(s5)) {
2650
+ peg$currPos++;
2651
+ } else {
2652
+ s5 = peg$FAILED;
2653
+ if (peg$silentFails === 0) {
2654
+ peg$fail(peg$e23);
2655
+ }
2656
+ }
2657
+ }
2658
+ while (s5 !== peg$FAILED) {
2659
+ s4.push(s5);
2660
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2661
+ s5 = peg$c10;
2662
+ peg$currPos += 2;
2663
+ } else {
2664
+ s5 = peg$FAILED;
2665
+ if (peg$silentFails === 0) {
2666
+ peg$fail(peg$e22);
2667
+ }
2668
+ }
2669
+ if (s5 === peg$FAILED) {
2670
+ s5 = input.charAt(peg$currPos);
2671
+ if (peg$r12.test(s5)) {
2672
+ peg$currPos++;
2673
+ } else {
2674
+ s5 = peg$FAILED;
2675
+ if (peg$silentFails === 0) {
2676
+ peg$fail(peg$e23);
2677
+ }
2678
+ }
2679
+ }
2680
+ }
2681
+ if (input.charCodeAt(peg$currPos) === 10) {
2682
+ s5 = peg$c0;
2683
+ peg$currPos++;
2684
+ } else {
2685
+ s5 = peg$FAILED;
2686
+ if (peg$silentFails === 0) {
2687
+ peg$fail(peg$e0);
2688
+ }
2689
+ }
2690
+ if (s5 !== peg$FAILED) {
2691
+ s4 = [s4, s5];
2692
+ s3 = s4;
2693
+ } else {
2694
+ peg$currPos = s3;
2695
+ s3 = peg$FAILED;
2696
+ }
2697
+ }
2698
+ } else {
2699
+ s2 = peg$FAILED;
2700
+ }
2701
+ if (s2 !== peg$FAILED) {
2702
+ s3 = [];
2703
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2704
+ s4 = peg$c10;
2705
+ peg$currPos += 2;
2706
+ } else {
2707
+ s4 = peg$FAILED;
2708
+ if (peg$silentFails === 0) {
2709
+ peg$fail(peg$e22);
2710
+ }
2711
+ }
2712
+ if (s4 === peg$FAILED) {
2713
+ s4 = input.charAt(peg$currPos);
2714
+ if (peg$r12.test(s4)) {
2715
+ peg$currPos++;
2716
+ } else {
2717
+ s4 = peg$FAILED;
2718
+ if (peg$silentFails === 0) {
2719
+ peg$fail(peg$e23);
2720
+ }
2721
+ }
2722
+ }
2723
+ while (s4 !== peg$FAILED) {
2724
+ s3.push(s4);
2725
+ if (input.substr(peg$currPos, 2) === peg$c10) {
2726
+ s4 = peg$c10;
2727
+ peg$currPos += 2;
2728
+ } else {
2729
+ s4 = peg$FAILED;
2730
+ if (peg$silentFails === 0) {
2731
+ peg$fail(peg$e22);
2732
+ }
2733
+ }
2734
+ if (s4 === peg$FAILED) {
2735
+ s4 = input.charAt(peg$currPos);
2736
+ if (peg$r12.test(s4)) {
2737
+ peg$currPos++;
2738
+ } else {
2739
+ s4 = peg$FAILED;
2740
+ if (peg$silentFails === 0) {
2741
+ peg$fail(peg$e23);
2742
+ }
2743
+ }
2744
+ }
2745
+ }
2746
+ s4 = input.charAt(peg$currPos);
2747
+ if (peg$r11.test(s4)) {
2748
+ peg$currPos++;
2749
+ } else {
2750
+ s4 = peg$FAILED;
2751
+ if (peg$silentFails === 0) {
2752
+ peg$fail(peg$e21);
2753
+ }
2754
+ }
2755
+ if (s4 !== peg$FAILED) {
2756
+ peg$savedPos = s0;
2757
+ s0 = peg$f20(s1);
2758
+ } else {
2759
+ peg$currPos = s0;
2760
+ s0 = peg$FAILED;
2761
+ }
2762
+ } else {
2763
+ peg$currPos = s0;
2764
+ s0 = peg$FAILED;
2765
+ }
2766
+ } else {
2767
+ peg$currPos = s0;
2768
+ s0 = peg$FAILED;
2769
+ }
2770
+ return s0;
2771
+ }
2772
+ __name(peg$parsesingleDQuotedMultiLineString, "peg$parsesingleDQuotedMultiLineString");
2773
+ function peg$parsetripleDQuotedMultiLineString() {
2774
+ var s0, s1, s2, s3, s4, s5, s6, s7;
2775
+ s0 = peg$currPos;
2776
+ if (input.substr(peg$currPos, 3) === peg$c13) {
2777
+ s1 = peg$c13;
2778
+ peg$currPos += 3;
2779
+ } else {
2780
+ s1 = peg$FAILED;
2781
+ if (peg$silentFails === 0) {
2782
+ peg$fail(peg$e30);
2783
+ }
2784
+ }
2785
+ if (s1 !== peg$FAILED) {
2786
+ s2 = [];
2787
+ s3 = peg$currPos;
2788
+ s4 = [];
2789
+ if (input.substr(peg$currPos, 4) === peg$c14) {
2790
+ s5 = peg$c14;
2791
+ peg$currPos += 4;
2792
+ } else {
2793
+ s5 = peg$FAILED;
2794
+ if (peg$silentFails === 0) {
2795
+ peg$fail(peg$e31);
2796
+ }
2797
+ }
2798
+ if (s5 === peg$FAILED) {
2799
+ s5 = peg$currPos;
2800
+ s6 = peg$currPos;
2801
+ peg$silentFails++;
2802
+ if (input.substr(peg$currPos, 3) === peg$c13) {
2803
+ s7 = peg$c13;
2804
+ peg$currPos += 3;
2805
+ } else {
2806
+ s7 = peg$FAILED;
2807
+ if (peg$silentFails === 0) {
2808
+ peg$fail(peg$e30);
2809
+ }
2810
+ }
2811
+ peg$silentFails--;
2812
+ if (s7 === peg$FAILED) {
2813
+ s6 = void 0;
2814
+ } else {
2815
+ peg$currPos = s6;
2816
+ s6 = peg$FAILED;
2817
+ }
2818
+ if (s6 !== peg$FAILED) {
2819
+ s7 = input.charAt(peg$currPos);
2820
+ if (peg$r2.test(s7)) {
2821
+ peg$currPos++;
2822
+ } else {
2823
+ s7 = peg$FAILED;
2824
+ if (peg$silentFails === 0) {
2825
+ peg$fail(peg$e7);
2826
+ }
2827
+ }
2828
+ if (s7 !== peg$FAILED) {
2829
+ s6 = [s6, s7];
2830
+ s5 = s6;
2831
+ } else {
2832
+ peg$currPos = s5;
2833
+ s5 = peg$FAILED;
2834
+ }
2835
+ } else {
2836
+ peg$currPos = s5;
2837
+ s5 = peg$FAILED;
2838
+ }
2839
+ }
2840
+ while (s5 !== peg$FAILED) {
2841
+ s4.push(s5);
2842
+ if (input.substr(peg$currPos, 4) === peg$c14) {
2843
+ s5 = peg$c14;
2844
+ peg$currPos += 4;
2845
+ } else {
2846
+ s5 = peg$FAILED;
2847
+ if (peg$silentFails === 0) {
2848
+ peg$fail(peg$e31);
2849
+ }
2850
+ }
2851
+ if (s5 === peg$FAILED) {
2852
+ s5 = peg$currPos;
2853
+ s6 = peg$currPos;
2854
+ peg$silentFails++;
2855
+ if (input.substr(peg$currPos, 3) === peg$c13) {
2856
+ s7 = peg$c13;
2857
+ peg$currPos += 3;
2858
+ } else {
2859
+ s7 = peg$FAILED;
2860
+ if (peg$silentFails === 0) {
2861
+ peg$fail(peg$e30);
2862
+ }
2863
+ }
2864
+ peg$silentFails--;
2865
+ if (s7 === peg$FAILED) {
2866
+ s6 = void 0;
2867
+ } else {
2868
+ peg$currPos = s6;
2869
+ s6 = peg$FAILED;
2870
+ }
2871
+ if (s6 !== peg$FAILED) {
2872
+ s7 = input.charAt(peg$currPos);
2873
+ if (peg$r2.test(s7)) {
2874
+ peg$currPos++;
2875
+ } else {
2876
+ s7 = peg$FAILED;
2877
+ if (peg$silentFails === 0) {
2878
+ peg$fail(peg$e7);
2879
+ }
2880
+ }
2881
+ if (s7 !== peg$FAILED) {
2882
+ s6 = [s6, s7];
2883
+ s5 = s6;
2884
+ } else {
2885
+ peg$currPos = s5;
2886
+ s5 = peg$FAILED;
2887
+ }
2888
+ } else {
2889
+ peg$currPos = s5;
2890
+ s5 = peg$FAILED;
2891
+ }
2892
+ }
2893
+ }
2894
+ if (input.charCodeAt(peg$currPos) === 10) {
2895
+ s5 = peg$c0;
2896
+ peg$currPos++;
2897
+ } else {
2898
+ s5 = peg$FAILED;
2899
+ if (peg$silentFails === 0) {
2900
+ peg$fail(peg$e0);
2901
+ }
2902
+ }
2903
+ if (s5 !== peg$FAILED) {
2904
+ s4 = [s4, s5];
2905
+ s3 = s4;
2906
+ } else {
2907
+ peg$currPos = s3;
2908
+ s3 = peg$FAILED;
2909
+ }
2910
+ if (s3 !== peg$FAILED) {
2911
+ while (s3 !== peg$FAILED) {
2912
+ s2.push(s3);
2913
+ s3 = peg$currPos;
2914
+ s4 = [];
2915
+ if (input.substr(peg$currPos, 4) === peg$c14) {
2916
+ s5 = peg$c14;
2917
+ peg$currPos += 4;
2918
+ } else {
2919
+ s5 = peg$FAILED;
2920
+ if (peg$silentFails === 0) {
2921
+ peg$fail(peg$e31);
2922
+ }
2923
+ }
2924
+ if (s5 === peg$FAILED) {
2925
+ s5 = peg$currPos;
2926
+ s6 = peg$currPos;
2927
+ peg$silentFails++;
2928
+ if (input.substr(peg$currPos, 3) === peg$c13) {
2929
+ s7 = peg$c13;
2930
+ peg$currPos += 3;
2931
+ } else {
2932
+ s7 = peg$FAILED;
2933
+ if (peg$silentFails === 0) {
2934
+ peg$fail(peg$e30);
2935
+ }
2936
+ }
2937
+ peg$silentFails--;
2938
+ if (s7 === peg$FAILED) {
2939
+ s6 = void 0;
2940
+ } else {
2941
+ peg$currPos = s6;
2942
+ s6 = peg$FAILED;
2943
+ }
2944
+ if (s6 !== peg$FAILED) {
2945
+ s7 = input.charAt(peg$currPos);
2946
+ if (peg$r2.test(s7)) {
2947
+ peg$currPos++;
2948
+ } else {
2949
+ s7 = peg$FAILED;
2950
+ if (peg$silentFails === 0) {
2951
+ peg$fail(peg$e7);
2952
+ }
2953
+ }
2954
+ if (s7 !== peg$FAILED) {
2955
+ s6 = [s6, s7];
2956
+ s5 = s6;
2957
+ } else {
2958
+ peg$currPos = s5;
2959
+ s5 = peg$FAILED;
2960
+ }
2961
+ } else {
2962
+ peg$currPos = s5;
2963
+ s5 = peg$FAILED;
2964
+ }
2965
+ }
2966
+ while (s5 !== peg$FAILED) {
2967
+ s4.push(s5);
2968
+ if (input.substr(peg$currPos, 4) === peg$c14) {
2969
+ s5 = peg$c14;
2970
+ peg$currPos += 4;
2971
+ } else {
2972
+ s5 = peg$FAILED;
2973
+ if (peg$silentFails === 0) {
2974
+ peg$fail(peg$e31);
2975
+ }
2976
+ }
2977
+ if (s5 === peg$FAILED) {
2978
+ s5 = peg$currPos;
2979
+ s6 = peg$currPos;
2980
+ peg$silentFails++;
2981
+ if (input.substr(peg$currPos, 3) === peg$c13) {
2982
+ s7 = peg$c13;
2983
+ peg$currPos += 3;
2984
+ } else {
2985
+ s7 = peg$FAILED;
2986
+ if (peg$silentFails === 0) {
2987
+ peg$fail(peg$e30);
2988
+ }
2989
+ }
2990
+ peg$silentFails--;
2991
+ if (s7 === peg$FAILED) {
2992
+ s6 = void 0;
2993
+ } else {
2994
+ peg$currPos = s6;
2995
+ s6 = peg$FAILED;
2996
+ }
2997
+ if (s6 !== peg$FAILED) {
2998
+ s7 = input.charAt(peg$currPos);
2999
+ if (peg$r2.test(s7)) {
3000
+ peg$currPos++;
3001
+ } else {
3002
+ s7 = peg$FAILED;
3003
+ if (peg$silentFails === 0) {
3004
+ peg$fail(peg$e7);
3005
+ }
3006
+ }
3007
+ if (s7 !== peg$FAILED) {
3008
+ s6 = [s6, s7];
3009
+ s5 = s6;
3010
+ } else {
3011
+ peg$currPos = s5;
3012
+ s5 = peg$FAILED;
3013
+ }
3014
+ } else {
3015
+ peg$currPos = s5;
3016
+ s5 = peg$FAILED;
3017
+ }
3018
+ }
3019
+ }
3020
+ if (input.charCodeAt(peg$currPos) === 10) {
3021
+ s5 = peg$c0;
3022
+ peg$currPos++;
3023
+ } else {
3024
+ s5 = peg$FAILED;
3025
+ if (peg$silentFails === 0) {
3026
+ peg$fail(peg$e0);
3027
+ }
3028
+ }
3029
+ if (s5 !== peg$FAILED) {
3030
+ s4 = [s4, s5];
3031
+ s3 = s4;
3032
+ } else {
3033
+ peg$currPos = s3;
3034
+ s3 = peg$FAILED;
3035
+ }
3036
+ }
3037
+ } else {
3038
+ s2 = peg$FAILED;
3039
+ }
3040
+ if (s2 !== peg$FAILED) {
3041
+ s3 = [];
3042
+ if (input.substr(peg$currPos, 4) === peg$c14) {
3043
+ s4 = peg$c14;
3044
+ peg$currPos += 4;
3045
+ } else {
3046
+ s4 = peg$FAILED;
3047
+ if (peg$silentFails === 0) {
3048
+ peg$fail(peg$e31);
3049
+ }
3050
+ }
3051
+ if (s4 === peg$FAILED) {
3052
+ s4 = peg$currPos;
3053
+ s5 = peg$currPos;
3054
+ peg$silentFails++;
3055
+ if (input.substr(peg$currPos, 3) === peg$c13) {
3056
+ s6 = peg$c13;
3057
+ peg$currPos += 3;
3058
+ } else {
3059
+ s6 = peg$FAILED;
3060
+ if (peg$silentFails === 0) {
3061
+ peg$fail(peg$e30);
3062
+ }
3063
+ }
3064
+ peg$silentFails--;
3065
+ if (s6 === peg$FAILED) {
3066
+ s5 = void 0;
3067
+ } else {
3068
+ peg$currPos = s5;
3069
+ s5 = peg$FAILED;
3070
+ }
3071
+ if (s5 !== peg$FAILED) {
3072
+ s6 = input.charAt(peg$currPos);
3073
+ if (peg$r2.test(s6)) {
3074
+ peg$currPos++;
3075
+ } else {
3076
+ s6 = peg$FAILED;
3077
+ if (peg$silentFails === 0) {
3078
+ peg$fail(peg$e7);
3079
+ }
3080
+ }
3081
+ if (s6 !== peg$FAILED) {
3082
+ s5 = [s5, s6];
3083
+ s4 = s5;
3084
+ } else {
3085
+ peg$currPos = s4;
3086
+ s4 = peg$FAILED;
3087
+ }
3088
+ } else {
3089
+ peg$currPos = s4;
3090
+ s4 = peg$FAILED;
3091
+ }
3092
+ }
3093
+ while (s4 !== peg$FAILED) {
3094
+ s3.push(s4);
3095
+ if (input.substr(peg$currPos, 4) === peg$c14) {
3096
+ s4 = peg$c14;
3097
+ peg$currPos += 4;
3098
+ } else {
3099
+ s4 = peg$FAILED;
3100
+ if (peg$silentFails === 0) {
3101
+ peg$fail(peg$e31);
3102
+ }
3103
+ }
3104
+ if (s4 === peg$FAILED) {
3105
+ s4 = peg$currPos;
3106
+ s5 = peg$currPos;
3107
+ peg$silentFails++;
3108
+ if (input.substr(peg$currPos, 3) === peg$c13) {
3109
+ s6 = peg$c13;
3110
+ peg$currPos += 3;
3111
+ } else {
3112
+ s6 = peg$FAILED;
3113
+ if (peg$silentFails === 0) {
3114
+ peg$fail(peg$e30);
3115
+ }
3116
+ }
3117
+ peg$silentFails--;
3118
+ if (s6 === peg$FAILED) {
3119
+ s5 = void 0;
3120
+ } else {
3121
+ peg$currPos = s5;
3122
+ s5 = peg$FAILED;
3123
+ }
3124
+ if (s5 !== peg$FAILED) {
3125
+ s6 = input.charAt(peg$currPos);
3126
+ if (peg$r2.test(s6)) {
3127
+ peg$currPos++;
3128
+ } else {
3129
+ s6 = peg$FAILED;
3130
+ if (peg$silentFails === 0) {
3131
+ peg$fail(peg$e7);
3132
+ }
3133
+ }
3134
+ if (s6 !== peg$FAILED) {
3135
+ s5 = [s5, s6];
3136
+ s4 = s5;
3137
+ } else {
3138
+ peg$currPos = s4;
3139
+ s4 = peg$FAILED;
3140
+ }
3141
+ } else {
3142
+ peg$currPos = s4;
3143
+ s4 = peg$FAILED;
3144
+ }
3145
+ }
3146
+ }
3147
+ if (input.substr(peg$currPos, 3) === peg$c13) {
3148
+ s4 = peg$c13;
3149
+ peg$currPos += 3;
3150
+ } else {
3151
+ s4 = peg$FAILED;
3152
+ if (peg$silentFails === 0) {
3153
+ peg$fail(peg$e30);
3154
+ }
3155
+ }
3156
+ if (s4 !== peg$FAILED) {
3157
+ peg$savedPos = s0;
3158
+ s0 = peg$f21(s1);
3159
+ } else {
3160
+ peg$currPos = s0;
3161
+ s0 = peg$FAILED;
3162
+ }
3163
+ } else {
3164
+ peg$currPos = s0;
3165
+ s0 = peg$FAILED;
3166
+ }
3167
+ } else {
3168
+ peg$currPos = s0;
3169
+ s0 = peg$FAILED;
3170
+ }
3171
+ return s0;
3172
+ }
3173
+ __name(peg$parsetripleDQuotedMultiLineString, "peg$parsetripleDQuotedMultiLineString");
3174
+ function peg$parsetripleBQuotedMultiLineString() {
3175
+ var s0, s1, s2, s3, s4, s5, s6, s7;
3176
+ s0 = peg$currPos;
3177
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3178
+ s1 = peg$c15;
3179
+ peg$currPos += 3;
3180
+ } else {
3181
+ s1 = peg$FAILED;
3182
+ if (peg$silentFails === 0) {
3183
+ peg$fail(peg$e32);
3184
+ }
3185
+ }
3186
+ if (s1 !== peg$FAILED) {
3187
+ s2 = [];
3188
+ s3 = peg$currPos;
3189
+ s4 = [];
3190
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3191
+ s5 = peg$c16;
3192
+ peg$currPos += 4;
3193
+ } else {
3194
+ s5 = peg$FAILED;
3195
+ if (peg$silentFails === 0) {
3196
+ peg$fail(peg$e33);
3197
+ }
3198
+ }
3199
+ if (s5 === peg$FAILED) {
3200
+ s5 = peg$currPos;
3201
+ s6 = peg$currPos;
3202
+ peg$silentFails++;
3203
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3204
+ s7 = peg$c15;
3205
+ peg$currPos += 3;
3206
+ } else {
3207
+ s7 = peg$FAILED;
3208
+ if (peg$silentFails === 0) {
3209
+ peg$fail(peg$e32);
3210
+ }
3211
+ }
3212
+ peg$silentFails--;
3213
+ if (s7 === peg$FAILED) {
3214
+ s6 = void 0;
3215
+ } else {
3216
+ peg$currPos = s6;
3217
+ s6 = peg$FAILED;
3218
+ }
3219
+ if (s6 !== peg$FAILED) {
3220
+ s7 = input.charAt(peg$currPos);
3221
+ if (peg$r2.test(s7)) {
3222
+ peg$currPos++;
3223
+ } else {
3224
+ s7 = peg$FAILED;
3225
+ if (peg$silentFails === 0) {
3226
+ peg$fail(peg$e7);
3227
+ }
3228
+ }
3229
+ if (s7 !== peg$FAILED) {
3230
+ s6 = [s6, s7];
3231
+ s5 = s6;
3232
+ } else {
3233
+ peg$currPos = s5;
3234
+ s5 = peg$FAILED;
3235
+ }
3236
+ } else {
3237
+ peg$currPos = s5;
3238
+ s5 = peg$FAILED;
3239
+ }
3240
+ }
3241
+ while (s5 !== peg$FAILED) {
3242
+ s4.push(s5);
3243
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3244
+ s5 = peg$c16;
3245
+ peg$currPos += 4;
3246
+ } else {
3247
+ s5 = peg$FAILED;
3248
+ if (peg$silentFails === 0) {
3249
+ peg$fail(peg$e33);
3250
+ }
3251
+ }
3252
+ if (s5 === peg$FAILED) {
3253
+ s5 = peg$currPos;
3254
+ s6 = peg$currPos;
3255
+ peg$silentFails++;
3256
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3257
+ s7 = peg$c15;
3258
+ peg$currPos += 3;
3259
+ } else {
3260
+ s7 = peg$FAILED;
3261
+ if (peg$silentFails === 0) {
3262
+ peg$fail(peg$e32);
3263
+ }
3264
+ }
3265
+ peg$silentFails--;
3266
+ if (s7 === peg$FAILED) {
3267
+ s6 = void 0;
3268
+ } else {
3269
+ peg$currPos = s6;
3270
+ s6 = peg$FAILED;
3271
+ }
3272
+ if (s6 !== peg$FAILED) {
3273
+ s7 = input.charAt(peg$currPos);
3274
+ if (peg$r2.test(s7)) {
3275
+ peg$currPos++;
3276
+ } else {
3277
+ s7 = peg$FAILED;
3278
+ if (peg$silentFails === 0) {
3279
+ peg$fail(peg$e7);
3280
+ }
3281
+ }
3282
+ if (s7 !== peg$FAILED) {
3283
+ s6 = [s6, s7];
3284
+ s5 = s6;
3285
+ } else {
3286
+ peg$currPos = s5;
3287
+ s5 = peg$FAILED;
3288
+ }
3289
+ } else {
3290
+ peg$currPos = s5;
3291
+ s5 = peg$FAILED;
3292
+ }
3293
+ }
3294
+ }
3295
+ if (input.charCodeAt(peg$currPos) === 10) {
3296
+ s5 = peg$c0;
3297
+ peg$currPos++;
3298
+ } else {
3299
+ s5 = peg$FAILED;
3300
+ if (peg$silentFails === 0) {
3301
+ peg$fail(peg$e0);
3302
+ }
3303
+ }
3304
+ if (s5 !== peg$FAILED) {
3305
+ s4 = [s4, s5];
3306
+ s3 = s4;
3307
+ } else {
3308
+ peg$currPos = s3;
3309
+ s3 = peg$FAILED;
3310
+ }
3311
+ if (s3 !== peg$FAILED) {
3312
+ while (s3 !== peg$FAILED) {
3313
+ s2.push(s3);
3314
+ s3 = peg$currPos;
3315
+ s4 = [];
3316
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3317
+ s5 = peg$c16;
3318
+ peg$currPos += 4;
3319
+ } else {
3320
+ s5 = peg$FAILED;
3321
+ if (peg$silentFails === 0) {
3322
+ peg$fail(peg$e33);
3323
+ }
3324
+ }
3325
+ if (s5 === peg$FAILED) {
3326
+ s5 = peg$currPos;
3327
+ s6 = peg$currPos;
3328
+ peg$silentFails++;
3329
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3330
+ s7 = peg$c15;
3331
+ peg$currPos += 3;
3332
+ } else {
3333
+ s7 = peg$FAILED;
3334
+ if (peg$silentFails === 0) {
3335
+ peg$fail(peg$e32);
3336
+ }
3337
+ }
3338
+ peg$silentFails--;
3339
+ if (s7 === peg$FAILED) {
3340
+ s6 = void 0;
3341
+ } else {
3342
+ peg$currPos = s6;
3343
+ s6 = peg$FAILED;
3344
+ }
3345
+ if (s6 !== peg$FAILED) {
3346
+ s7 = input.charAt(peg$currPos);
3347
+ if (peg$r2.test(s7)) {
3348
+ peg$currPos++;
3349
+ } else {
3350
+ s7 = peg$FAILED;
3351
+ if (peg$silentFails === 0) {
3352
+ peg$fail(peg$e7);
3353
+ }
3354
+ }
3355
+ if (s7 !== peg$FAILED) {
3356
+ s6 = [s6, s7];
3357
+ s5 = s6;
3358
+ } else {
3359
+ peg$currPos = s5;
3360
+ s5 = peg$FAILED;
3361
+ }
3362
+ } else {
3363
+ peg$currPos = s5;
3364
+ s5 = peg$FAILED;
3365
+ }
3366
+ }
3367
+ while (s5 !== peg$FAILED) {
3368
+ s4.push(s5);
3369
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3370
+ s5 = peg$c16;
3371
+ peg$currPos += 4;
3372
+ } else {
3373
+ s5 = peg$FAILED;
3374
+ if (peg$silentFails === 0) {
3375
+ peg$fail(peg$e33);
3376
+ }
3377
+ }
3378
+ if (s5 === peg$FAILED) {
3379
+ s5 = peg$currPos;
3380
+ s6 = peg$currPos;
3381
+ peg$silentFails++;
3382
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3383
+ s7 = peg$c15;
3384
+ peg$currPos += 3;
3385
+ } else {
3386
+ s7 = peg$FAILED;
3387
+ if (peg$silentFails === 0) {
3388
+ peg$fail(peg$e32);
3389
+ }
3390
+ }
3391
+ peg$silentFails--;
3392
+ if (s7 === peg$FAILED) {
3393
+ s6 = void 0;
3394
+ } else {
3395
+ peg$currPos = s6;
3396
+ s6 = peg$FAILED;
3397
+ }
3398
+ if (s6 !== peg$FAILED) {
3399
+ s7 = input.charAt(peg$currPos);
3400
+ if (peg$r2.test(s7)) {
3401
+ peg$currPos++;
3402
+ } else {
3403
+ s7 = peg$FAILED;
3404
+ if (peg$silentFails === 0) {
3405
+ peg$fail(peg$e7);
3406
+ }
3407
+ }
3408
+ if (s7 !== peg$FAILED) {
3409
+ s6 = [s6, s7];
3410
+ s5 = s6;
3411
+ } else {
3412
+ peg$currPos = s5;
3413
+ s5 = peg$FAILED;
3414
+ }
3415
+ } else {
3416
+ peg$currPos = s5;
3417
+ s5 = peg$FAILED;
3418
+ }
3419
+ }
3420
+ }
3421
+ if (input.charCodeAt(peg$currPos) === 10) {
3422
+ s5 = peg$c0;
3423
+ peg$currPos++;
3424
+ } else {
3425
+ s5 = peg$FAILED;
3426
+ if (peg$silentFails === 0) {
3427
+ peg$fail(peg$e0);
3428
+ }
3429
+ }
3430
+ if (s5 !== peg$FAILED) {
3431
+ s4 = [s4, s5];
3432
+ s3 = s4;
3433
+ } else {
3434
+ peg$currPos = s3;
3435
+ s3 = peg$FAILED;
3436
+ }
3437
+ }
3438
+ } else {
3439
+ s2 = peg$FAILED;
3440
+ }
3441
+ if (s2 !== peg$FAILED) {
3442
+ s3 = [];
3443
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3444
+ s4 = peg$c16;
3445
+ peg$currPos += 4;
3446
+ } else {
3447
+ s4 = peg$FAILED;
3448
+ if (peg$silentFails === 0) {
3449
+ peg$fail(peg$e33);
3450
+ }
3451
+ }
3452
+ if (s4 === peg$FAILED) {
3453
+ s4 = peg$currPos;
3454
+ s5 = peg$currPos;
3455
+ peg$silentFails++;
3456
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3457
+ s6 = peg$c15;
3458
+ peg$currPos += 3;
3459
+ } else {
3460
+ s6 = peg$FAILED;
3461
+ if (peg$silentFails === 0) {
3462
+ peg$fail(peg$e32);
3463
+ }
3464
+ }
3465
+ peg$silentFails--;
3466
+ if (s6 === peg$FAILED) {
3467
+ s5 = void 0;
3468
+ } else {
3469
+ peg$currPos = s5;
3470
+ s5 = peg$FAILED;
3471
+ }
3472
+ if (s5 !== peg$FAILED) {
3473
+ s6 = input.charAt(peg$currPos);
3474
+ if (peg$r2.test(s6)) {
3475
+ peg$currPos++;
3476
+ } else {
3477
+ s6 = peg$FAILED;
3478
+ if (peg$silentFails === 0) {
3479
+ peg$fail(peg$e7);
3480
+ }
3481
+ }
3482
+ if (s6 !== peg$FAILED) {
3483
+ s5 = [s5, s6];
3484
+ s4 = s5;
3485
+ } else {
3486
+ peg$currPos = s4;
3487
+ s4 = peg$FAILED;
3488
+ }
3489
+ } else {
3490
+ peg$currPos = s4;
3491
+ s4 = peg$FAILED;
3492
+ }
3493
+ }
3494
+ while (s4 !== peg$FAILED) {
3495
+ s3.push(s4);
3496
+ if (input.substr(peg$currPos, 4) === peg$c16) {
3497
+ s4 = peg$c16;
3498
+ peg$currPos += 4;
3499
+ } else {
3500
+ s4 = peg$FAILED;
3501
+ if (peg$silentFails === 0) {
3502
+ peg$fail(peg$e33);
3503
+ }
3504
+ }
3505
+ if (s4 === peg$FAILED) {
3506
+ s4 = peg$currPos;
3507
+ s5 = peg$currPos;
3508
+ peg$silentFails++;
3509
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3510
+ s6 = peg$c15;
3511
+ peg$currPos += 3;
3512
+ } else {
3513
+ s6 = peg$FAILED;
3514
+ if (peg$silentFails === 0) {
3515
+ peg$fail(peg$e32);
3516
+ }
3517
+ }
3518
+ peg$silentFails--;
3519
+ if (s6 === peg$FAILED) {
3520
+ s5 = void 0;
3521
+ } else {
3522
+ peg$currPos = s5;
3523
+ s5 = peg$FAILED;
3524
+ }
3525
+ if (s5 !== peg$FAILED) {
3526
+ s6 = input.charAt(peg$currPos);
3527
+ if (peg$r2.test(s6)) {
3528
+ peg$currPos++;
3529
+ } else {
3530
+ s6 = peg$FAILED;
3531
+ if (peg$silentFails === 0) {
3532
+ peg$fail(peg$e7);
3533
+ }
3534
+ }
3535
+ if (s6 !== peg$FAILED) {
3536
+ s5 = [s5, s6];
3537
+ s4 = s5;
3538
+ } else {
3539
+ peg$currPos = s4;
3540
+ s4 = peg$FAILED;
3541
+ }
3542
+ } else {
3543
+ peg$currPos = s4;
3544
+ s4 = peg$FAILED;
3545
+ }
3546
+ }
3547
+ }
3548
+ if (input.substr(peg$currPos, 3) === peg$c15) {
3549
+ s4 = peg$c15;
3550
+ peg$currPos += 3;
3551
+ } else {
3552
+ s4 = peg$FAILED;
3553
+ if (peg$silentFails === 0) {
3554
+ peg$fail(peg$e32);
3555
+ }
3556
+ }
3557
+ if (s4 !== peg$FAILED) {
3558
+ peg$savedPos = s0;
3559
+ s0 = peg$f22(s1);
3560
+ } else {
3561
+ peg$currPos = s0;
3562
+ s0 = peg$FAILED;
3563
+ }
3564
+ } else {
3565
+ peg$currPos = s0;
3566
+ s0 = peg$FAILED;
3567
+ }
3568
+ } else {
3569
+ peg$currPos = s0;
3570
+ s0 = peg$FAILED;
3571
+ }
3572
+ return s0;
3573
+ }
3574
+ __name(peg$parsetripleBQuotedMultiLineString, "peg$parsetripleBQuotedMultiLineString");
3575
+ function peg$parse_n() {
3576
+ var s0, s1;
3577
+ if (input.charCodeAt(peg$currPos) === 10) {
3578
+ s0 = peg$c0;
3579
+ peg$currPos++;
3580
+ } else {
3581
+ s0 = peg$FAILED;
3582
+ if (peg$silentFails === 0) {
3583
+ peg$fail(peg$e0);
3584
+ }
3585
+ }
3586
+ if (s0 === peg$FAILED) {
3587
+ s0 = peg$currPos;
3588
+ peg$silentFails++;
3589
+ if (input.length > peg$currPos) {
3590
+ s1 = input.charAt(peg$currPos);
3591
+ peg$currPos++;
3592
+ } else {
3593
+ s1 = peg$FAILED;
3594
+ if (peg$silentFails === 0) {
3595
+ peg$fail(peg$e34);
3596
+ }
3597
+ }
3598
+ peg$silentFails--;
3599
+ if (s1 === peg$FAILED) {
3600
+ s0 = void 0;
3601
+ } else {
3602
+ peg$currPos = s0;
3603
+ s0 = peg$FAILED;
3604
+ }
3605
+ }
3606
+ return s0;
3607
+ }
3608
+ __name(peg$parse_n, "peg$parse_n");
3609
+ function peg$parse_() {
3610
+ var s0, s1;
3611
+ s0 = [];
3612
+ s1 = input.charAt(peg$currPos);
3613
+ if (peg$r17.test(s1)) {
3614
+ peg$currPos++;
3615
+ } else {
3616
+ s1 = peg$FAILED;
3617
+ if (peg$silentFails === 0) {
3618
+ peg$fail(peg$e35);
3619
+ }
3620
+ }
3621
+ while (s1 !== peg$FAILED) {
3622
+ s0.push(s1);
3623
+ s1 = input.charAt(peg$currPos);
3624
+ if (peg$r17.test(s1)) {
3625
+ peg$currPos++;
3626
+ } else {
3627
+ s1 = peg$FAILED;
3628
+ if (peg$silentFails === 0) {
3629
+ peg$fail(peg$e35);
3630
+ }
3631
+ }
3632
+ }
3633
+ return s0;
3634
+ }
3635
+ __name(peg$parse_, "peg$parse_");
3636
+ function peg$parse__() {
3637
+ var s0, s1;
3638
+ s0 = [];
3639
+ s1 = input.charAt(peg$currPos);
3640
+ if (peg$r17.test(s1)) {
3641
+ peg$currPos++;
3642
+ } else {
3643
+ s1 = peg$FAILED;
3644
+ if (peg$silentFails === 0) {
3645
+ peg$fail(peg$e35);
3646
+ }
3647
+ }
3648
+ if (s1 !== peg$FAILED) {
3649
+ while (s1 !== peg$FAILED) {
3650
+ s0.push(s1);
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
+ }
3661
+ } else {
3662
+ s0 = peg$FAILED;
3663
+ }
3664
+ return s0;
3665
+ }
3666
+ __name(peg$parse__, "peg$parse__");
3667
+ peg$result = peg$startRuleFunction();
3668
+ if (options.peg$library) {
3669
+ return (
3670
+ /** @type {any} */
3671
+ {
3672
+ peg$result,
3673
+ peg$currPos,
3674
+ peg$FAILED,
3675
+ peg$maxFailExpected,
3676
+ peg$maxFailPos
3677
+ }
3678
+ );
3679
+ }
3680
+ if (peg$result !== peg$FAILED && peg$currPos === input.length) {
3681
+ return peg$result;
3682
+ } else {
3683
+ if (peg$result !== peg$FAILED && peg$currPos < input.length) {
3684
+ peg$fail(peg$endExpectation());
3685
+ }
3686
+ throw peg$buildStructuredError(
3687
+ peg$maxFailExpected,
3688
+ peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,
3689
+ peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
3690
+ );
3691
+ }
3692
+ }
3693
+ __name(peg$parse, "peg$parse");
3694
+
3695
+ // src/index.ts
3696
+ function parseEnvSpecDotEnvFile(source) {
3697
+ return peg$parse(source);
3698
+ }
3699
+ __name(parseEnvSpecDotEnvFile, "parseEnvSpecDotEnvFile");
3700
+
3701
+ export { envSpecUpdater, parseEnvSpecDotEnvFile };
3702
+ //# sourceMappingURL=index.mjs.map
3703
+ //# sourceMappingURL=index.mjs.map