objection 3.4.1 → 3.6.0

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.
@@ -1,277 +1,316 @@
1
- /*
2
- * Generated by PEG.js 0.10.0.
3
- *
4
- * http://pegjs.org/
5
- */
1
+ // @generated by Peggy 5.1.0.
2
+ //
3
+ // https://peggyjs.org/
6
4
 
7
5
  'use strict';
8
6
 
9
- function peg$subclass(child, parent) {
10
- function ctor() {
11
- this.constructor = child;
12
- }
13
- ctor.prototype = parent.prototype;
14
- child.prototype = new ctor();
15
- }
16
-
17
- function peg$SyntaxError(message, expected, found, location) {
18
- this.message = message;
19
- this.expected = expected;
20
- this.found = found;
21
- this.location = location;
22
- this.name = 'SyntaxError';
23
-
24
- if (typeof Error.captureStackTrace === 'function') {
25
- Error.captureStackTrace(this, peg$SyntaxError);
7
+ class peg$SyntaxError extends SyntaxError {
8
+ constructor(message, expected, found, location) {
9
+ super(message);
10
+ this.expected = expected;
11
+ this.found = found;
12
+ this.location = location;
13
+ this.name = 'SyntaxError';
14
+ }
15
+
16
+ format(sources) {
17
+ let str = 'Error: ' + this.message;
18
+ if (this.location) {
19
+ let src = null;
20
+ const st = sources.find((s) => s.source === this.location.source);
21
+ if (st) {
22
+ src = st.text.split(/\r\n|\n|\r/g);
23
+ }
24
+ const s = this.location.start;
25
+ const offset_s =
26
+ this.location.source && typeof this.location.source.offset === 'function'
27
+ ? this.location.source.offset(s)
28
+ : s;
29
+ const loc = this.location.source + ':' + offset_s.line + ':' + offset_s.column;
30
+ if (src) {
31
+ const e = this.location.end;
32
+ const filler = ''.padEnd(offset_s.line.toString().length, ' ');
33
+ const line = src[s.line - 1];
34
+ const last = s.line === e.line ? e.column : line.length + 1;
35
+ const hatLen = last - s.column || 1;
36
+ str +=
37
+ '\n --> ' +
38
+ loc +
39
+ '\n' +
40
+ filler +
41
+ ' |\n' +
42
+ offset_s.line +
43
+ ' | ' +
44
+ line +
45
+ '\n' +
46
+ filler +
47
+ ' | ' +
48
+ ''.padEnd(s.column - 1, ' ') +
49
+ ''.padEnd(hatLen, '^');
50
+ } else {
51
+ str += '\n at ' + loc;
52
+ }
53
+ }
54
+ return str;
26
55
  }
27
- }
28
56
 
29
- peg$subclass(peg$SyntaxError, Error);
30
-
31
- peg$SyntaxError.buildMessage = function (expected, found) {
32
- var DESCRIBE_EXPECTATION_FNS = {
33
- literal: function (expectation) {
34
- return '"' + literalEscape(expectation.text) + '"';
35
- },
36
-
37
- class: function (expectation) {
38
- var escapedParts = '',
39
- i;
57
+ static buildMessage(expected, found) {
58
+ function hex(ch) {
59
+ return ch.codePointAt(0).toString(16).toUpperCase();
60
+ }
40
61
 
41
- for (i = 0; i < expectation.parts.length; i++) {
42
- escapedParts +=
43
- expectation.parts[i] instanceof Array
44
- ? classEscape(expectation.parts[i][0]) + '-' + classEscape(expectation.parts[i][1])
45
- : classEscape(expectation.parts[i]);
62
+ const nonPrintable = Object.prototype.hasOwnProperty.call(RegExp.prototype, 'unicode')
63
+ ? new RegExp('[\\p{C}\\p{Mn}\\p{Mc}]', 'gu')
64
+ : null;
65
+ function unicodeEscape(s) {
66
+ if (nonPrintable) {
67
+ return s.replace(nonPrintable, (ch) => '\\u{' + hex(ch) + '}');
46
68
  }
69
+ return s;
70
+ }
47
71
 
48
- return '[' + (expectation.inverted ? '^' : '') + escapedParts + ']';
49
- },
50
-
51
- any: function (expectation) {
52
- return 'any character';
53
- },
72
+ function literalEscape(s) {
73
+ return unicodeEscape(
74
+ s
75
+ .replace(/\\/g, '\\\\')
76
+ .replace(/"/g, '\\"')
77
+ .replace(/\0/g, '\\0')
78
+ .replace(/\t/g, '\\t')
79
+ .replace(/\n/g, '\\n')
80
+ .replace(/\r/g, '\\r')
81
+ .replace(/[\x00-\x0F]/g, (ch) => '\\x0' + hex(ch))
82
+ .replace(/[\x10-\x1F\x7F-\x9F]/g, (ch) => '\\x' + hex(ch)),
83
+ );
84
+ }
54
85
 
55
- end: function (expectation) {
56
- return 'end of input';
57
- },
86
+ function classEscape(s) {
87
+ return unicodeEscape(
88
+ s
89
+ .replace(/\\/g, '\\\\')
90
+ .replace(/\]/g, '\\]')
91
+ .replace(/\^/g, '\\^')
92
+ .replace(/-/g, '\\-')
93
+ .replace(/\0/g, '\\0')
94
+ .replace(/\t/g, '\\t')
95
+ .replace(/\n/g, '\\n')
96
+ .replace(/\r/g, '\\r')
97
+ .replace(/[\x00-\x0F]/g, (ch) => '\\x0' + hex(ch))
98
+ .replace(/[\x10-\x1F\x7F-\x9F]/g, (ch) => '\\x' + hex(ch)),
99
+ );
100
+ }
58
101
 
59
- other: function (expectation) {
60
- return expectation.description;
61
- },
62
- };
102
+ const DESCRIBE_EXPECTATION_FNS = {
103
+ literal(expectation) {
104
+ return '"' + literalEscape(expectation.text) + '"';
105
+ },
63
106
 
64
- function hex(ch) {
65
- return ch.charCodeAt(0).toString(16).toUpperCase();
66
- }
107
+ class(expectation) {
108
+ const escapedParts = expectation.parts.map((part) =>
109
+ Array.isArray(part)
110
+ ? classEscape(part[0]) + '-' + classEscape(part[1])
111
+ : classEscape(part),
112
+ );
67
113
 
68
- function literalEscape(s) {
69
- return s
70
- .replace(/\\/g, '\\\\')
71
- .replace(/"/g, '\\"')
72
- .replace(/\0/g, '\\0')
73
- .replace(/\t/g, '\\t')
74
- .replace(/\n/g, '\\n')
75
- .replace(/\r/g, '\\r')
76
- .replace(/[\x00-\x0F]/g, function (ch) {
77
- return '\\x0' + hex(ch);
78
- })
79
- .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) {
80
- return '\\x' + hex(ch);
81
- });
82
- }
114
+ return (
115
+ '[' +
116
+ (expectation.inverted ? '^' : '') +
117
+ escapedParts.join('') +
118
+ ']' +
119
+ (expectation.unicode ? 'u' : '')
120
+ );
121
+ },
83
122
 
84
- function classEscape(s) {
85
- return s
86
- .replace(/\\/g, '\\\\')
87
- .replace(/\]/g, '\\]')
88
- .replace(/\^/g, '\\^')
89
- .replace(/-/g, '\\-')
90
- .replace(/\0/g, '\\0')
91
- .replace(/\t/g, '\\t')
92
- .replace(/\n/g, '\\n')
93
- .replace(/\r/g, '\\r')
94
- .replace(/[\x00-\x0F]/g, function (ch) {
95
- return '\\x0' + hex(ch);
96
- })
97
- .replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) {
98
- return '\\x' + hex(ch);
99
- });
100
- }
123
+ any() {
124
+ return 'any character';
125
+ },
101
126
 
102
- function describeExpectation(expectation) {
103
- return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
104
- }
127
+ end() {
128
+ return 'end of input';
129
+ },
105
130
 
106
- function describeExpected(expected) {
107
- var descriptions = new Array(expected.length),
108
- i,
109
- j;
131
+ other(expectation) {
132
+ return expectation.description;
133
+ },
134
+ };
110
135
 
111
- for (i = 0; i < expected.length; i++) {
112
- descriptions[i] = describeExpectation(expected[i]);
136
+ function describeExpectation(expectation) {
137
+ return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
113
138
  }
114
139
 
115
- descriptions.sort();
140
+ function describeExpected(expected) {
141
+ const descriptions = expected.map(describeExpectation);
142
+ descriptions.sort();
116
143
 
117
- if (descriptions.length > 0) {
118
- for (i = 1, j = 1; i < descriptions.length; i++) {
119
- if (descriptions[i - 1] !== descriptions[i]) {
120
- descriptions[j] = descriptions[i];
121
- j++;
144
+ if (descriptions.length > 0) {
145
+ let j = 1;
146
+ for (let i = 1; i < descriptions.length; i++) {
147
+ if (descriptions[i - 1] !== descriptions[i]) {
148
+ descriptions[j] = descriptions[i];
149
+ j++;
150
+ }
122
151
  }
152
+ descriptions.length = j;
123
153
  }
124
- descriptions.length = j;
125
- }
126
154
 
127
- switch (descriptions.length) {
128
- case 1:
129
- return descriptions[0];
155
+ switch (descriptions.length) {
156
+ case 1:
157
+ return descriptions[0];
130
158
 
131
- case 2:
132
- return descriptions[0] + ' or ' + descriptions[1];
159
+ case 2:
160
+ return descriptions[0] + ' or ' + descriptions[1];
133
161
 
134
- default:
135
- return (
136
- descriptions.slice(0, -1).join(', ') + ', or ' + descriptions[descriptions.length - 1]
137
- );
162
+ default:
163
+ return (
164
+ descriptions.slice(0, -1).join(', ') + ', or ' + descriptions[descriptions.length - 1]
165
+ );
166
+ }
138
167
  }
139
- }
140
168
 
141
- function describeFound(found) {
142
- return found ? '"' + literalEscape(found) + '"' : 'end of input';
143
- }
169
+ function describeFound(found) {
170
+ return found ? '"' + literalEscape(found) + '"' : 'end of input';
171
+ }
144
172
 
145
- return 'Expected ' + describeExpected(expected) + ' but ' + describeFound(found) + ' found.';
146
- };
173
+ return 'Expected ' + describeExpected(expected) + ' but ' + describeFound(found) + ' found.';
174
+ }
175
+ }
147
176
 
148
177
  function peg$parse(input, options) {
149
- options = options !== void 0 ? options : {};
178
+ options = options !== undefined ? options : {};
150
179
 
151
- var peg$FAILED = {},
152
- peg$startRuleFunctions = { start: peg$parsestart },
153
- peg$startRuleFunction = peg$parsestart,
154
- peg$c0 = function (expr) {
155
- const node = newNode();
180
+ const peg$FAILED = {};
181
+ const peg$source = options.grammarSource;
156
182
 
157
- if (expr.$name === '*') {
158
- node.$allRecursive = true;
159
- } else {
160
- assertDuplicateRelation(node, expr);
161
- node[expr.$name] = expr;
162
- node.$childNames.push(expr.$name);
163
- }
183
+ const peg$startRuleFunctions = {
184
+ start: peg$parsestart,
185
+ };
186
+ let peg$startRuleFunction = peg$parsestart;
187
+
188
+ const peg$c0 = 'as';
189
+ const peg$c1 = '(';
190
+ const peg$c2 = ')';
191
+ const peg$c3 = ',';
192
+ const peg$c4 = '.';
193
+ const peg$c5 = '[';
194
+ const peg$c6 = ']';
195
+
196
+ const peg$r0 = /^[^[\](),. \t\r\n]/;
197
+ const peg$r1 = /^[ \t\r\n]/;
198
+
199
+ const peg$e0 = peg$literalExpectation('as', false);
200
+ const peg$e1 = peg$classExpectation(
201
+ ['[', ']', '(', ')', ',', '.', ' ', '\t', '\r', '\n'],
202
+ true,
203
+ false,
204
+ false,
205
+ );
206
+ const peg$e2 = peg$literalExpectation('(', false);
207
+ const peg$e3 = peg$literalExpectation(')', false);
208
+ const peg$e4 = peg$literalExpectation(',', false);
209
+ const peg$e5 = peg$classExpectation([' ', '\t', '\r', '\n'], false, false, false);
210
+ const peg$e6 = peg$literalExpectation('.', false);
211
+ const peg$e7 = peg$literalExpectation('[', false);
212
+ const peg$e8 = peg$literalExpectation(']', false);
213
+
214
+ function peg$f0(expr) {
215
+ const node = newNode();
216
+
217
+ if (expr.$name === '*') {
218
+ node.$allRecursive = true;
219
+ } else {
220
+ assertDuplicateRelation(node, expr);
221
+ node[expr.$name] = expr;
222
+ node.$childNames.push(expr.$name);
223
+ }
164
224
 
165
- return node;
166
- },
167
- peg$c1 = function (list) {
168
- const node = newNode();
225
+ return node;
226
+ }
227
+ function peg$f1(list) {
228
+ const node = newNode();
169
229
 
170
- list.forEach((expr) => {
171
- assertDuplicateRelation(node, expr);
172
- node[expr.$name] = expr;
173
- node.$childNames.push(expr.$name);
174
- });
230
+ list.forEach((expr) => {
231
+ assertDuplicateRelation(node, expr);
232
+ node[expr.$name] = expr;
233
+ node.$childNames.push(expr.$name);
234
+ });
175
235
 
176
- return node;
177
- },
178
- peg$c2 = function (name, args, alias, list) {
179
- const node = newNode();
236
+ return node;
237
+ }
238
+ function peg$f2(name, args, alias, list) {
239
+ const node = newNode();
180
240
 
181
- node.$name = alias || name;
182
- node.$relation = name;
183
- node.$modify = args || [];
241
+ node.$name = alias || name;
242
+ node.$relation = name;
243
+ node.$modify = args || [];
184
244
 
185
- list.forEach((expr) => {
186
- assertDuplicateRelation(node, expr);
187
- node[expr.$name] = expr;
188
- node.$childNames.push(expr.$name);
189
- });
245
+ list.forEach((expr) => {
246
+ assertDuplicateRelation(node, expr);
247
+ node[expr.$name] = expr;
248
+ node.$childNames.push(expr.$name);
249
+ });
190
250
 
191
- return node;
192
- },
193
- peg$c3 = function (name, args, alias, expr) {
194
- const node = newNode();
251
+ return node;
252
+ }
253
+ function peg$f3(name, args, alias, expr) {
254
+ const node = newNode();
195
255
 
196
- node.$name = alias || name;
197
- node.$relation = name;
198
- node.$modify = args || [];
256
+ node.$name = alias || name;
257
+ node.$relation = name;
258
+ node.$modify = args || [];
199
259
 
200
- if (expr) {
201
- const match = /^\^(\d*)$/.exec(expr.$name);
260
+ if (expr) {
261
+ const match = /^\^(\d*)$/.exec(expr.$name);
202
262
 
203
- if (match) {
204
- if (match[1]) {
205
- node.$recursive = parseInt(match[1], 10);
206
- } else {
207
- node.$recursive = true;
208
- }
209
- } else if (expr.$name === '*') {
210
- node.$allRecursive = true;
263
+ if (match) {
264
+ if (match[1]) {
265
+ node.$recursive = parseInt(match[1], 10);
211
266
  } else {
212
- assertDuplicateRelation(node, expr);
213
- node[expr.$name] = expr;
214
- node.$childNames.push(expr.$name);
267
+ node.$recursive = true;
215
268
  }
269
+ } else if (expr.$name === '*') {
270
+ node.$allRecursive = true;
271
+ } else {
272
+ assertDuplicateRelation(node, expr);
273
+ node[expr.$name] = expr;
274
+ node.$childNames.push(expr.$name);
216
275
  }
276
+ }
217
277
 
218
- return node;
219
- },
220
- peg$c4 = 'as',
221
- peg$c5 = peg$literalExpectation('as', false),
222
- peg$c6 = function (alias) {
223
- return alias;
224
- },
225
- peg$c7 = function (name) {
226
- return name.join('');
227
- },
228
- peg$c8 = /^[^[\](),. \t\r\n]/,
229
- peg$c9 = peg$classExpectation(
230
- ['[', ']', '(', ')', ',', '.', ' ', '\t', '\r', '\n'],
231
- true,
232
- false,
233
- ),
234
- peg$c10 = '(',
235
- peg$c11 = peg$literalExpectation('(', false),
236
- peg$c12 = ')',
237
- peg$c13 = peg$literalExpectation(')', false),
238
- peg$c14 = function (args) {
239
- return args;
240
- },
241
- peg$c15 = ',',
242
- peg$c16 = peg$literalExpectation(',', false),
243
- peg$c17 = function (arg) {
244
- return arg;
245
- },
246
- peg$c18 = /^[ \t\r\n]/,
247
- peg$c19 = peg$classExpectation([' ', '\t', '\r', '\n'], false, false),
248
- peg$c20 = '.',
249
- peg$c21 = peg$literalExpectation('.', false),
250
- peg$c22 = function (list) {
251
- return list;
252
- },
253
- peg$c23 = '[',
254
- peg$c24 = peg$literalExpectation('[', false),
255
- peg$c25 = ']',
256
- peg$c26 = peg$literalExpectation(']', false),
257
- peg$c27 = function (items) {
258
- return items;
259
- },
260
- peg$c28 = function (expr) {
261
- return expr;
262
- },
263
- peg$c29 = function (sub) {
264
- return sub;
265
- },
266
- peg$currPos = 0,
267
- peg$savedPos = 0,
268
- peg$posDetailsCache = [{ line: 1, column: 1 }],
269
- peg$maxFailPos = 0,
270
- peg$maxFailExpected = [],
271
- peg$silentFails = 0,
272
- peg$result;
273
-
274
- if ('startRule' in options) {
278
+ return node;
279
+ }
280
+ function peg$f4(alias) {
281
+ return alias;
282
+ }
283
+ function peg$f5(name) {
284
+ return name.join('');
285
+ }
286
+ function peg$f6(args) {
287
+ return args;
288
+ }
289
+ function peg$f7(arg) {
290
+ return arg;
291
+ }
292
+ function peg$f8(list) {
293
+ return list;
294
+ }
295
+ function peg$f9(items) {
296
+ return items;
297
+ }
298
+ function peg$f10(expr) {
299
+ return expr;
300
+ }
301
+ function peg$f11(sub) {
302
+ return sub;
303
+ }
304
+ let peg$currPos = options.peg$currPos | 0;
305
+ let peg$savedPos = peg$currPos;
306
+ const peg$posDetailsCache = [{ line: 1, column: 1 }];
307
+ let peg$maxFailPos = peg$currPos;
308
+ let peg$maxFailExpected = options.peg$maxFailExpected || [];
309
+ let peg$silentFails = options.peg$silentFails | 0;
310
+
311
+ let peg$result;
312
+
313
+ if (options.startRule) {
275
314
  if (!(options.startRule in peg$startRuleFunctions)) {
276
315
  throw new Error('Can\'t start parsing from rule "' + options.startRule + '".');
277
316
  }
@@ -283,12 +322,24 @@ function peg$parse(input, options) {
283
322
  return input.substring(peg$savedPos, peg$currPos);
284
323
  }
285
324
 
325
+ function offset() {
326
+ return peg$savedPos;
327
+ }
328
+
329
+ function range() {
330
+ return {
331
+ source: peg$source,
332
+ start: peg$savedPos,
333
+ end: peg$currPos,
334
+ };
335
+ }
336
+
286
337
  function location() {
287
338
  return peg$computeLocation(peg$savedPos, peg$currPos);
288
339
  }
289
340
 
290
341
  function expected(description, location) {
291
- location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos);
342
+ location = location !== undefined ? location : peg$computeLocation(peg$savedPos, peg$currPos);
292
343
 
293
344
  throw peg$buildStructuredError(
294
345
  [peg$otherExpectation(description)],
@@ -298,17 +349,25 @@ function peg$parse(input, options) {
298
349
  }
299
350
 
300
351
  function error(message, location) {
301
- location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos);
352
+ location = location !== undefined ? location : peg$computeLocation(peg$savedPos, peg$currPos);
302
353
 
303
354
  throw peg$buildSimpleError(message, location);
304
355
  }
305
356
 
357
+ function peg$getUnicode(pos = peg$currPos) {
358
+ const cp = input.codePointAt(pos);
359
+ if (cp === undefined) {
360
+ return '';
361
+ }
362
+ return String.fromCodePoint(cp);
363
+ }
364
+
306
365
  function peg$literalExpectation(text, ignoreCase) {
307
- return { type: 'literal', text: text, ignoreCase: ignoreCase };
366
+ return { type: 'literal', text, ignoreCase };
308
367
  }
309
368
 
310
- function peg$classExpectation(parts, inverted, ignoreCase) {
311
- return { type: 'class', parts: parts, inverted: inverted, ignoreCase: ignoreCase };
369
+ function peg$classExpectation(parts, inverted, ignoreCase, unicode) {
370
+ return { type: 'class', parts, inverted, ignoreCase, unicode };
312
371
  }
313
372
 
314
373
  function peg$anyExpectation() {
@@ -320,19 +379,21 @@ function peg$parse(input, options) {
320
379
  }
321
380
 
322
381
  function peg$otherExpectation(description) {
323
- return { type: 'other', description: description };
382
+ return { type: 'other', description };
324
383
  }
325
384
 
326
385
  function peg$computePosDetails(pos) {
327
- var details = peg$posDetailsCache[pos],
328
- p;
386
+ let details = peg$posDetailsCache[pos];
387
+ let p;
329
388
 
330
389
  if (details) {
331
390
  return details;
332
391
  } else {
333
- p = pos - 1;
334
- while (!peg$posDetailsCache[p]) {
335
- p--;
392
+ if (pos >= peg$posDetailsCache.length) {
393
+ p = peg$posDetailsCache.length - 1;
394
+ } else {
395
+ p = pos;
396
+ while (!peg$posDetailsCache[--p]) {}
336
397
  }
337
398
 
338
399
  details = peg$posDetailsCache[p];
@@ -353,15 +414,17 @@ function peg$parse(input, options) {
353
414
  }
354
415
 
355
416
  peg$posDetailsCache[pos] = details;
417
+
356
418
  return details;
357
419
  }
358
420
  }
359
421
 
360
- function peg$computeLocation(startPos, endPos) {
361
- var startPosDetails = peg$computePosDetails(startPos),
362
- endPosDetails = peg$computePosDetails(endPos);
422
+ function peg$computeLocation(startPos, endPos, offset) {
423
+ const startPosDetails = peg$computePosDetails(startPos);
424
+ const endPosDetails = peg$computePosDetails(endPos);
363
425
 
364
- return {
426
+ const res = {
427
+ source: peg$source,
365
428
  start: {
366
429
  offset: startPos,
367
430
  line: startPosDetails.line,
@@ -373,6 +436,11 @@ function peg$parse(input, options) {
373
436
  column: endPosDetails.column,
374
437
  },
375
438
  };
439
+ if (offset && peg$source && typeof peg$source.offset === 'function') {
440
+ res.start = peg$source.offset(res.start);
441
+ res.end = peg$source.offset(res.end);
442
+ }
443
+ return res;
376
444
  }
377
445
 
378
446
  function peg$fail(expected) {
@@ -402,13 +470,13 @@ function peg$parse(input, options) {
402
470
  }
403
471
 
404
472
  function peg$parsestart() {
405
- var s0, s1;
473
+ let s0, s1;
406
474
 
407
475
  s0 = peg$currPos;
408
476
  s1 = peg$parseexpression();
409
477
  if (s1 !== peg$FAILED) {
410
478
  peg$savedPos = s0;
411
- s1 = peg$c0(s1);
479
+ s1 = peg$f0(s1);
412
480
  }
413
481
  s0 = s1;
414
482
  if (s0 === peg$FAILED) {
@@ -416,7 +484,7 @@ function peg$parse(input, options) {
416
484
  s1 = peg$parselistExpression();
417
485
  if (s1 !== peg$FAILED) {
418
486
  peg$savedPos = s0;
419
- s1 = peg$c1(s1);
487
+ s1 = peg$f1(s1);
420
488
  }
421
489
  s0 = s1;
422
490
  }
@@ -425,7 +493,7 @@ function peg$parse(input, options) {
425
493
  }
426
494
 
427
495
  function peg$parseexpression() {
428
- var s0, s1, s2, s3, s4;
496
+ let s0, s1, s2, s3, s4;
429
497
 
430
498
  s0 = peg$currPos;
431
499
  s1 = peg$parsename();
@@ -434,25 +502,14 @@ function peg$parse(input, options) {
434
502
  if (s2 === peg$FAILED) {
435
503
  s2 = null;
436
504
  }
437
- if (s2 !== peg$FAILED) {
438
- s3 = peg$parsealias();
439
- if (s3 === peg$FAILED) {
440
- s3 = null;
441
- }
442
- if (s3 !== peg$FAILED) {
443
- s4 = peg$parsesubListExpression();
444
- if (s4 !== peg$FAILED) {
445
- peg$savedPos = s0;
446
- s1 = peg$c2(s1, s2, s3, s4);
447
- s0 = s1;
448
- } else {
449
- peg$currPos = s0;
450
- s0 = peg$FAILED;
451
- }
452
- } else {
453
- peg$currPos = s0;
454
- s0 = peg$FAILED;
455
- }
505
+ s3 = peg$parsealias();
506
+ if (s3 === peg$FAILED) {
507
+ s3 = null;
508
+ }
509
+ s4 = peg$parsesubListExpression();
510
+ if (s4 !== peg$FAILED) {
511
+ peg$savedPos = s0;
512
+ s0 = peg$f2(s1, s2, s3, s4);
456
513
  } else {
457
514
  peg$currPos = s0;
458
515
  s0 = peg$FAILED;
@@ -469,32 +526,16 @@ function peg$parse(input, options) {
469
526
  if (s2 === peg$FAILED) {
470
527
  s2 = null;
471
528
  }
472
- if (s2 !== peg$FAILED) {
473
- s3 = peg$parsealias();
474
- if (s3 === peg$FAILED) {
475
- s3 = null;
476
- }
477
- if (s3 !== peg$FAILED) {
478
- s4 = peg$parsesubExpression();
479
- if (s4 === peg$FAILED) {
480
- s4 = null;
481
- }
482
- if (s4 !== peg$FAILED) {
483
- peg$savedPos = s0;
484
- s1 = peg$c3(s1, s2, s3, s4);
485
- s0 = s1;
486
- } else {
487
- peg$currPos = s0;
488
- s0 = peg$FAILED;
489
- }
490
- } else {
491
- peg$currPos = s0;
492
- s0 = peg$FAILED;
493
- }
494
- } else {
495
- peg$currPos = s0;
496
- s0 = peg$FAILED;
529
+ s3 = peg$parsealias();
530
+ if (s3 === peg$FAILED) {
531
+ s3 = null;
497
532
  }
533
+ s4 = peg$parsesubExpression();
534
+ if (s4 === peg$FAILED) {
535
+ s4 = null;
536
+ }
537
+ peg$savedPos = s0;
538
+ s0 = peg$f3(s1, s2, s3, s4);
498
539
  } else {
499
540
  peg$currPos = s0;
500
541
  s0 = peg$FAILED;
@@ -505,7 +546,7 @@ function peg$parse(input, options) {
505
546
  }
506
547
 
507
548
  function peg$parsealias() {
508
- var s0, s1, s2, s3, s4;
549
+ let s0, s1, s2, s3, s4;
509
550
 
510
551
  s0 = peg$currPos;
511
552
  s1 = [];
@@ -519,13 +560,13 @@ function peg$parse(input, options) {
519
560
  s1 = peg$FAILED;
520
561
  }
521
562
  if (s1 !== peg$FAILED) {
522
- if (input.substr(peg$currPos, 2) === peg$c4) {
523
- s2 = peg$c4;
563
+ if (input.substr(peg$currPos, 2) === peg$c0) {
564
+ s2 = peg$c0;
524
565
  peg$currPos += 2;
525
566
  } else {
526
567
  s2 = peg$FAILED;
527
568
  if (peg$silentFails === 0) {
528
- peg$fail(peg$c5);
569
+ peg$fail(peg$e0);
529
570
  }
530
571
  }
531
572
  if (s2 !== peg$FAILED) {
@@ -543,8 +584,7 @@ function peg$parse(input, options) {
543
584
  s4 = peg$parsename();
544
585
  if (s4 !== peg$FAILED) {
545
586
  peg$savedPos = s0;
546
- s1 = peg$c6(s4);
547
- s0 = s1;
587
+ s0 = peg$f4(s4);
548
588
  } else {
549
589
  peg$currPos = s0;
550
590
  s0 = peg$FAILED;
@@ -566,7 +606,7 @@ function peg$parse(input, options) {
566
606
  }
567
607
 
568
608
  function peg$parsename() {
569
- var s0, s1, s2;
609
+ let s0, s1, s2;
570
610
 
571
611
  s0 = peg$currPos;
572
612
  s1 = [];
@@ -581,7 +621,7 @@ function peg$parse(input, options) {
581
621
  }
582
622
  if (s1 !== peg$FAILED) {
583
623
  peg$savedPos = s0;
584
- s1 = peg$c7(s1);
624
+ s1 = peg$f5(s1);
585
625
  }
586
626
  s0 = s1;
587
627
 
@@ -589,15 +629,15 @@ function peg$parse(input, options) {
589
629
  }
590
630
 
591
631
  function peg$parsechar() {
592
- var s0;
632
+ let s0;
593
633
 
594
- if (peg$c8.test(input.charAt(peg$currPos))) {
595
- s0 = input.charAt(peg$currPos);
634
+ s0 = input.charAt(peg$currPos);
635
+ if (peg$r0.test(s0)) {
596
636
  peg$currPos++;
597
637
  } else {
598
638
  s0 = peg$FAILED;
599
639
  if (peg$silentFails === 0) {
600
- peg$fail(peg$c9);
640
+ peg$fail(peg$e1);
601
641
  }
602
642
  }
603
643
 
@@ -605,7 +645,7 @@ function peg$parse(input, options) {
605
645
  }
606
646
 
607
647
  function peg$parseargs() {
608
- var s0, s1, s2, s3, s4, s5;
648
+ let s0, s1, s2, s3, s4, s5;
609
649
 
610
650
  s0 = peg$currPos;
611
651
  s1 = [];
@@ -614,56 +654,40 @@ function peg$parse(input, options) {
614
654
  s1.push(s2);
615
655
  s2 = peg$parsews();
616
656
  }
617
- if (s1 !== peg$FAILED) {
618
- if (input.charCodeAt(peg$currPos) === 40) {
619
- s2 = peg$c10;
657
+ if (input.charCodeAt(peg$currPos) === 40) {
658
+ s2 = peg$c1;
659
+ peg$currPos++;
660
+ } else {
661
+ s2 = peg$FAILED;
662
+ if (peg$silentFails === 0) {
663
+ peg$fail(peg$e2);
664
+ }
665
+ }
666
+ if (s2 !== peg$FAILED) {
667
+ s3 = [];
668
+ s4 = peg$parseargListItem();
669
+ while (s4 !== peg$FAILED) {
670
+ s3.push(s4);
671
+ s4 = peg$parseargListItem();
672
+ }
673
+ s4 = [];
674
+ s5 = peg$parsews();
675
+ while (s5 !== peg$FAILED) {
676
+ s4.push(s5);
677
+ s5 = peg$parsews();
678
+ }
679
+ if (input.charCodeAt(peg$currPos) === 41) {
680
+ s5 = peg$c2;
620
681
  peg$currPos++;
621
682
  } else {
622
- s2 = peg$FAILED;
683
+ s5 = peg$FAILED;
623
684
  if (peg$silentFails === 0) {
624
- peg$fail(peg$c11);
685
+ peg$fail(peg$e3);
625
686
  }
626
687
  }
627
- if (s2 !== peg$FAILED) {
628
- s3 = [];
629
- s4 = peg$parseargListItem();
630
- while (s4 !== peg$FAILED) {
631
- s3.push(s4);
632
- s4 = peg$parseargListItem();
633
- }
634
- if (s3 !== peg$FAILED) {
635
- s4 = [];
636
- s5 = peg$parsews();
637
- while (s5 !== peg$FAILED) {
638
- s4.push(s5);
639
- s5 = peg$parsews();
640
- }
641
- if (s4 !== peg$FAILED) {
642
- if (input.charCodeAt(peg$currPos) === 41) {
643
- s5 = peg$c12;
644
- peg$currPos++;
645
- } else {
646
- s5 = peg$FAILED;
647
- if (peg$silentFails === 0) {
648
- peg$fail(peg$c13);
649
- }
650
- }
651
- if (s5 !== peg$FAILED) {
652
- peg$savedPos = s0;
653
- s1 = peg$c14(s3);
654
- s0 = s1;
655
- } else {
656
- peg$currPos = s0;
657
- s0 = peg$FAILED;
658
- }
659
- } else {
660
- peg$currPos = s0;
661
- s0 = peg$FAILED;
662
- }
663
- } else {
664
- peg$currPos = s0;
665
- s0 = peg$FAILED;
666
- }
688
+ if (s5 !== peg$FAILED) {
689
+ peg$savedPos = s0;
690
+ s0 = peg$f6(s3);
667
691
  } else {
668
692
  peg$currPos = s0;
669
693
  s0 = peg$FAILED;
@@ -677,7 +701,7 @@ function peg$parse(input, options) {
677
701
  }
678
702
 
679
703
  function peg$parseargListItem() {
680
- var s0, s1, s2, s3, s4;
704
+ let s0, s1, s2, s3, s4;
681
705
 
682
706
  s0 = peg$currPos;
683
707
  s1 = [];
@@ -686,44 +710,28 @@ function peg$parse(input, options) {
686
710
  s1.push(s2);
687
711
  s2 = peg$parsews();
688
712
  }
689
- if (s1 !== peg$FAILED) {
690
- s2 = peg$parsename();
691
- if (s2 !== peg$FAILED) {
692
- s3 = [];
713
+ s2 = peg$parsename();
714
+ if (s2 !== peg$FAILED) {
715
+ s3 = [];
716
+ s4 = peg$parsews();
717
+ while (s4 !== peg$FAILED) {
718
+ s3.push(s4);
693
719
  s4 = peg$parsews();
694
- while (s4 !== peg$FAILED) {
695
- s3.push(s4);
696
- s4 = peg$parsews();
697
- }
698
- if (s3 !== peg$FAILED) {
699
- if (input.charCodeAt(peg$currPos) === 44) {
700
- s4 = peg$c15;
701
- peg$currPos++;
702
- } else {
703
- s4 = peg$FAILED;
704
- if (peg$silentFails === 0) {
705
- peg$fail(peg$c16);
706
- }
707
- }
708
- if (s4 === peg$FAILED) {
709
- s4 = null;
710
- }
711
- if (s4 !== peg$FAILED) {
712
- peg$savedPos = s0;
713
- s1 = peg$c17(s2);
714
- s0 = s1;
715
- } else {
716
- peg$currPos = s0;
717
- s0 = peg$FAILED;
718
- }
719
- } else {
720
- peg$currPos = s0;
721
- s0 = peg$FAILED;
722
- }
720
+ }
721
+ if (input.charCodeAt(peg$currPos) === 44) {
722
+ s4 = peg$c3;
723
+ peg$currPos++;
723
724
  } else {
724
- peg$currPos = s0;
725
- s0 = peg$FAILED;
725
+ s4 = peg$FAILED;
726
+ if (peg$silentFails === 0) {
727
+ peg$fail(peg$e4);
728
+ }
726
729
  }
730
+ if (s4 === peg$FAILED) {
731
+ s4 = null;
732
+ }
733
+ peg$savedPos = s0;
734
+ s0 = peg$f7(s2);
727
735
  } else {
728
736
  peg$currPos = s0;
729
737
  s0 = peg$FAILED;
@@ -733,15 +741,15 @@ function peg$parse(input, options) {
733
741
  }
734
742
 
735
743
  function peg$parsews() {
736
- var s0;
744
+ let s0;
737
745
 
738
- if (peg$c18.test(input.charAt(peg$currPos))) {
739
- s0 = input.charAt(peg$currPos);
746
+ s0 = input.charAt(peg$currPos);
747
+ if (peg$r1.test(s0)) {
740
748
  peg$currPos++;
741
749
  } else {
742
750
  s0 = peg$FAILED;
743
751
  if (peg$silentFails === 0) {
744
- peg$fail(peg$c19);
752
+ peg$fail(peg$e5);
745
753
  }
746
754
  }
747
755
 
@@ -749,7 +757,7 @@ function peg$parse(input, options) {
749
757
  }
750
758
 
751
759
  function peg$parsesubListExpression() {
752
- var s0, s1, s2, s3;
760
+ let s0, s1, s2, s3;
753
761
 
754
762
  s0 = peg$currPos;
755
763
  s1 = [];
@@ -758,26 +766,20 @@ function peg$parse(input, options) {
758
766
  s1.push(s2);
759
767
  s2 = peg$parsews();
760
768
  }
761
- if (s1 !== peg$FAILED) {
762
- if (input.charCodeAt(peg$currPos) === 46) {
763
- s2 = peg$c20;
764
- peg$currPos++;
765
- } else {
766
- s2 = peg$FAILED;
767
- if (peg$silentFails === 0) {
768
- peg$fail(peg$c21);
769
- }
769
+ if (input.charCodeAt(peg$currPos) === 46) {
770
+ s2 = peg$c4;
771
+ peg$currPos++;
772
+ } else {
773
+ s2 = peg$FAILED;
774
+ if (peg$silentFails === 0) {
775
+ peg$fail(peg$e6);
770
776
  }
771
- if (s2 !== peg$FAILED) {
772
- s3 = peg$parselistExpression();
773
- if (s3 !== peg$FAILED) {
774
- peg$savedPos = s0;
775
- s1 = peg$c22(s3);
776
- s0 = s1;
777
- } else {
778
- peg$currPos = s0;
779
- s0 = peg$FAILED;
780
- }
777
+ }
778
+ if (s2 !== peg$FAILED) {
779
+ s3 = peg$parselistExpression();
780
+ if (s3 !== peg$FAILED) {
781
+ peg$savedPos = s0;
782
+ s0 = peg$f8(s3);
781
783
  } else {
782
784
  peg$currPos = s0;
783
785
  s0 = peg$FAILED;
@@ -791,7 +793,7 @@ function peg$parse(input, options) {
791
793
  }
792
794
 
793
795
  function peg$parselistExpression() {
794
- var s0, s1, s2, s3, s4, s5, s6, s7;
796
+ let s0, s1, s2, s3, s4, s5, s6, s7;
795
797
 
796
798
  s0 = peg$currPos;
797
799
  s1 = [];
@@ -800,67 +802,46 @@ function peg$parse(input, options) {
800
802
  s1.push(s2);
801
803
  s2 = peg$parsews();
802
804
  }
803
- if (s1 !== peg$FAILED) {
804
- if (input.charCodeAt(peg$currPos) === 91) {
805
- s2 = peg$c23;
805
+ if (input.charCodeAt(peg$currPos) === 91) {
806
+ s2 = peg$c5;
807
+ peg$currPos++;
808
+ } else {
809
+ s2 = peg$FAILED;
810
+ if (peg$silentFails === 0) {
811
+ peg$fail(peg$e7);
812
+ }
813
+ }
814
+ if (s2 !== peg$FAILED) {
815
+ s3 = [];
816
+ s4 = peg$parselistExpressionItem();
817
+ while (s4 !== peg$FAILED) {
818
+ s3.push(s4);
819
+ s4 = peg$parselistExpressionItem();
820
+ }
821
+ s4 = [];
822
+ s5 = peg$parsews();
823
+ while (s5 !== peg$FAILED) {
824
+ s4.push(s5);
825
+ s5 = peg$parsews();
826
+ }
827
+ if (input.charCodeAt(peg$currPos) === 93) {
828
+ s5 = peg$c6;
806
829
  peg$currPos++;
807
830
  } else {
808
- s2 = peg$FAILED;
831
+ s5 = peg$FAILED;
809
832
  if (peg$silentFails === 0) {
810
- peg$fail(peg$c24);
833
+ peg$fail(peg$e8);
811
834
  }
812
835
  }
813
- if (s2 !== peg$FAILED) {
814
- s3 = [];
815
- s4 = peg$parselistExpressionItem();
816
- while (s4 !== peg$FAILED) {
817
- s3.push(s4);
818
- s4 = peg$parselistExpressionItem();
819
- }
820
- if (s3 !== peg$FAILED) {
821
- s4 = [];
822
- s5 = peg$parsews();
823
- while (s5 !== peg$FAILED) {
824
- s4.push(s5);
825
- s5 = peg$parsews();
826
- }
827
- if (s4 !== peg$FAILED) {
828
- if (input.charCodeAt(peg$currPos) === 93) {
829
- s5 = peg$c25;
830
- peg$currPos++;
831
- } else {
832
- s5 = peg$FAILED;
833
- if (peg$silentFails === 0) {
834
- peg$fail(peg$c26);
835
- }
836
- }
837
- if (s5 !== peg$FAILED) {
838
- s6 = [];
839
- s7 = peg$parsews();
840
- while (s7 !== peg$FAILED) {
841
- s6.push(s7);
842
- s7 = peg$parsews();
843
- }
844
- if (s6 !== peg$FAILED) {
845
- peg$savedPos = s0;
846
- s1 = peg$c27(s3);
847
- s0 = s1;
848
- } else {
849
- peg$currPos = s0;
850
- s0 = peg$FAILED;
851
- }
852
- } else {
853
- peg$currPos = s0;
854
- s0 = peg$FAILED;
855
- }
856
- } else {
857
- peg$currPos = s0;
858
- s0 = peg$FAILED;
859
- }
860
- } else {
861
- peg$currPos = s0;
862
- s0 = peg$FAILED;
836
+ if (s5 !== peg$FAILED) {
837
+ s6 = [];
838
+ s7 = peg$parsews();
839
+ while (s7 !== peg$FAILED) {
840
+ s6.push(s7);
841
+ s7 = peg$parsews();
863
842
  }
843
+ peg$savedPos = s0;
844
+ s0 = peg$f9(s3);
864
845
  } else {
865
846
  peg$currPos = s0;
866
847
  s0 = peg$FAILED;
@@ -874,7 +855,7 @@ function peg$parse(input, options) {
874
855
  }
875
856
 
876
857
  function peg$parselistExpressionItem() {
877
- var s0, s1, s2, s3, s4;
858
+ let s0, s1, s2, s3, s4;
878
859
 
879
860
  s0 = peg$currPos;
880
861
  s1 = [];
@@ -883,44 +864,28 @@ function peg$parse(input, options) {
883
864
  s1.push(s2);
884
865
  s2 = peg$parsews();
885
866
  }
886
- if (s1 !== peg$FAILED) {
887
- s2 = peg$parseexpression();
888
- if (s2 !== peg$FAILED) {
889
- s3 = [];
867
+ s2 = peg$parseexpression();
868
+ if (s2 !== peg$FAILED) {
869
+ s3 = [];
870
+ s4 = peg$parsews();
871
+ while (s4 !== peg$FAILED) {
872
+ s3.push(s4);
890
873
  s4 = peg$parsews();
891
- while (s4 !== peg$FAILED) {
892
- s3.push(s4);
893
- s4 = peg$parsews();
894
- }
895
- if (s3 !== peg$FAILED) {
896
- if (input.charCodeAt(peg$currPos) === 44) {
897
- s4 = peg$c15;
898
- peg$currPos++;
899
- } else {
900
- s4 = peg$FAILED;
901
- if (peg$silentFails === 0) {
902
- peg$fail(peg$c16);
903
- }
904
- }
905
- if (s4 === peg$FAILED) {
906
- s4 = null;
907
- }
908
- if (s4 !== peg$FAILED) {
909
- peg$savedPos = s0;
910
- s1 = peg$c28(s2);
911
- s0 = s1;
912
- } else {
913
- peg$currPos = s0;
914
- s0 = peg$FAILED;
915
- }
916
- } else {
917
- peg$currPos = s0;
918
- s0 = peg$FAILED;
919
- }
874
+ }
875
+ if (input.charCodeAt(peg$currPos) === 44) {
876
+ s4 = peg$c3;
877
+ peg$currPos++;
920
878
  } else {
921
- peg$currPos = s0;
922
- s0 = peg$FAILED;
879
+ s4 = peg$FAILED;
880
+ if (peg$silentFails === 0) {
881
+ peg$fail(peg$e4);
882
+ }
883
+ }
884
+ if (s4 === peg$FAILED) {
885
+ s4 = null;
923
886
  }
887
+ peg$savedPos = s0;
888
+ s0 = peg$f10(s2);
924
889
  } else {
925
890
  peg$currPos = s0;
926
891
  s0 = peg$FAILED;
@@ -930,7 +895,7 @@ function peg$parse(input, options) {
930
895
  }
931
896
 
932
897
  function peg$parsesubExpression() {
933
- var s0, s1, s2, s3, s4, s5, s6;
898
+ let s0, s1, s2, s3, s4, s5, s6;
934
899
 
935
900
  s0 = peg$currPos;
936
901
  s1 = [];
@@ -939,48 +904,32 @@ function peg$parse(input, options) {
939
904
  s1.push(s2);
940
905
  s2 = peg$parsews();
941
906
  }
942
- if (s1 !== peg$FAILED) {
943
- if (input.charCodeAt(peg$currPos) === 46) {
944
- s2 = peg$c20;
945
- peg$currPos++;
946
- } else {
947
- s2 = peg$FAILED;
948
- if (peg$silentFails === 0) {
949
- peg$fail(peg$c21);
950
- }
907
+ if (input.charCodeAt(peg$currPos) === 46) {
908
+ s2 = peg$c4;
909
+ peg$currPos++;
910
+ } else {
911
+ s2 = peg$FAILED;
912
+ if (peg$silentFails === 0) {
913
+ peg$fail(peg$e6);
951
914
  }
952
- if (s2 !== peg$FAILED) {
953
- s3 = [];
915
+ }
916
+ if (s2 !== peg$FAILED) {
917
+ s3 = [];
918
+ s4 = peg$parsews();
919
+ while (s4 !== peg$FAILED) {
920
+ s3.push(s4);
954
921
  s4 = peg$parsews();
955
- while (s4 !== peg$FAILED) {
956
- s3.push(s4);
957
- s4 = peg$parsews();
958
- }
959
- if (s3 !== peg$FAILED) {
960
- s4 = peg$parseexpression();
961
- if (s4 !== peg$FAILED) {
962
- s5 = [];
963
- s6 = peg$parsews();
964
- while (s6 !== peg$FAILED) {
965
- s5.push(s6);
966
- s6 = peg$parsews();
967
- }
968
- if (s5 !== peg$FAILED) {
969
- peg$savedPos = s0;
970
- s1 = peg$c29(s4);
971
- s0 = s1;
972
- } else {
973
- peg$currPos = s0;
974
- s0 = peg$FAILED;
975
- }
976
- } else {
977
- peg$currPos = s0;
978
- s0 = peg$FAILED;
979
- }
980
- } else {
981
- peg$currPos = s0;
982
- s0 = peg$FAILED;
922
+ }
923
+ s4 = peg$parseexpression();
924
+ if (s4 !== peg$FAILED) {
925
+ s5 = [];
926
+ s6 = peg$parsews();
927
+ while (s6 !== peg$FAILED) {
928
+ s5.push(s6);
929
+ s6 = peg$parsews();
983
930
  }
931
+ peg$savedPos = s0;
932
+ s0 = peg$f11(s4);
984
933
  } else {
985
934
  peg$currPos = s0;
986
935
  s0 = peg$FAILED;
@@ -1019,24 +968,40 @@ function peg$parse(input, options) {
1019
968
 
1020
969
  peg$result = peg$startRuleFunction();
1021
970
 
1022
- if (peg$result !== peg$FAILED && peg$currPos === input.length) {
1023
- return peg$result;
1024
- } else {
971
+ const peg$success = peg$result !== peg$FAILED && peg$currPos === input.length;
972
+ function peg$throw() {
1025
973
  if (peg$result !== peg$FAILED && peg$currPos < input.length) {
1026
974
  peg$fail(peg$endExpectation());
1027
975
  }
1028
976
 
1029
977
  throw peg$buildStructuredError(
1030
978
  peg$maxFailExpected,
1031
- peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,
979
+ peg$maxFailPos < input.length ? peg$getUnicode(peg$maxFailPos) : null,
1032
980
  peg$maxFailPos < input.length
1033
981
  ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
1034
982
  : peg$computeLocation(peg$maxFailPos, peg$maxFailPos),
1035
983
  );
1036
984
  }
985
+ if (options.peg$library) {
986
+ return /** @type {any} */ ({
987
+ peg$result,
988
+ peg$currPos,
989
+ peg$FAILED,
990
+ peg$maxFailExpected,
991
+ peg$maxFailPos,
992
+ peg$success,
993
+ peg$throw: peg$success ? undefined : peg$throw,
994
+ });
995
+ }
996
+ if (peg$success) {
997
+ return peg$result;
998
+ } else {
999
+ peg$throw();
1000
+ }
1037
1001
  }
1038
1002
 
1039
1003
  module.exports = {
1004
+ StartRules: ['start'],
1040
1005
  SyntaxError: peg$SyntaxError,
1041
1006
  parse: peg$parse,
1042
1007
  };