podlite 0.0.91 → 0.0.92
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/CHANGELOG.podlite +20 -0
- package/esm/assemble/index.d.ts +2 -0
- package/esm/assemble/index.js +404 -57
- package/esm/assemble/index.js.map +1 -1
- package/esm/cli.js +5 -1
- package/esm/cli.js.map +1 -1
- package/esm/lint/grammar/lint.js +914 -181
- package/esm/lint/grammar/lint.js.map +1 -1
- package/esm/lint/rules/include-resolves.js +30 -17
- package/esm/lint/rules/include-resolves.js.map +1 -1
- package/esm/lint/rules/index.js +6 -0
- package/esm/lint/rules/index.js.map +1 -1
- package/esm/lint/rules/item-hierarchy.d.ts +3 -0
- package/esm/lint/rules/item-hierarchy.js +65 -0
- package/esm/lint/rules/item-hierarchy.js.map +1 -0
- package/esm/lint/rules/markup-code-too-deep.d.ts +3 -0
- package/esm/lint/rules/markup-code-too-deep.js +16 -0
- package/esm/lint/rules/markup-code-too-deep.js.map +1 -0
- package/esm/lint/rules/table-column-width.js +14 -6
- package/esm/lint/rules/table-column-width.js.map +1 -1
- package/esm/lint/rules/test-under-rule.d.ts +3 -0
- package/esm/lint/rules/test-under-rule.js +135 -0
- package/esm/lint/rules/test-under-rule.js.map +1 -0
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/lib/assemble/index.d.ts +2 -0
- package/lib/assemble/index.js +406 -58
- package/lib/assemble/index.js.map +1 -1
- package/lib/cli.js +5 -1
- package/lib/cli.js.map +1 -1
- package/lib/lint/grammar/lint.js +914 -181
- package/lib/lint/grammar/lint.js.map +1 -1
- package/lib/lint/rules/include-resolves.js +29 -16
- package/lib/lint/rules/include-resolves.js.map +1 -1
- package/lib/lint/rules/index.js +6 -0
- package/lib/lint/rules/index.js.map +1 -1
- package/lib/lint/rules/item-hierarchy.d.ts +3 -0
- package/lib/lint/rules/item-hierarchy.js +68 -0
- package/lib/lint/rules/item-hierarchy.js.map +1 -0
- package/lib/lint/rules/markup-code-too-deep.d.ts +3 -0
- package/lib/lint/rules/markup-code-too-deep.js +19 -0
- package/lib/lint/rules/markup-code-too-deep.js.map +1 -0
- package/lib/lint/rules/table-column-width.js +14 -6
- package/lib/lint/rules/table-column-width.js.map +1 -1
- package/lib/lint/rules/test-under-rule.d.ts +3 -0
- package/lib/lint/rules/test-under-rule.js +138 -0
- package/lib/lint/rules/test-under-rule.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +8 -8
package/esm/lint/grammar/lint.js
CHANGED
|
@@ -117,16 +117,35 @@ peg$SyntaxError.buildMessage = function (expected, found) {
|
|
|
117
117
|
function peg$parse(input, options) {
|
|
118
118
|
options = options !== void 0 ? options : {};
|
|
119
119
|
var peg$FAILED = {}, peg$startRuleFunctions = { start: peg$parsestart }, peg$startRuleFunction = peg$parsestart, peg$c0 = peg$anyExpectation(), peg$c1 = function () {
|
|
120
|
-
// an option is written after whitespace, or after the brace or a comma of a hash
|
|
121
120
|
if (!options._inDirective || options._blockStack.some(b => options.isVerbatim(b.name)))
|
|
122
121
|
return false;
|
|
123
122
|
return /[ \t\x7b,]/.test(input.charAt(location().start.offset - 1));
|
|
124
|
-
}, peg$c2 = ':', peg$c3 = peg$literalExpectation(':', false), peg$c4 = '<', peg$c5 = peg$literalExpectation('<', false), peg$c6 =
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
}, peg$c2 = ':', peg$c3 = peg$literalExpectation(':', false), peg$c4 = '<', peg$c5 = peg$literalExpectation('<', false), peg$c6 = '>', peg$c7 = peg$literalExpectation('>', false), peg$c8 = function (value) {
|
|
124
|
+
return value.quoted;
|
|
125
|
+
}, peg$c9 = function (value) {
|
|
126
|
+
if (options.closedEarly(input.slice(peg$savedPos + text().length).split(/\r?\n/)[0], options.inHash(location().start.offset))) {
|
|
127
|
+
options.diagnostics.push({
|
|
128
|
+
rule: 'attr-nested-angle',
|
|
129
|
+
severity: 'error',
|
|
130
|
+
message: 'attribute value contains a > that closes the attribute early; ' + options.nestedAngleAdvice,
|
|
131
|
+
location: location(),
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
return null;
|
|
135
|
+
}, peg$c10 = function (first, e) {
|
|
136
|
+
return e;
|
|
137
|
+
}, peg$c11 = function (first, rest) {
|
|
138
|
+
return { quoted: [first].concat(rest).some(e => e) };
|
|
139
|
+
}, peg$c12 = function () {
|
|
140
|
+
return true;
|
|
141
|
+
}, peg$c13 = 'True', peg$c14 = peg$literalExpectation('True', false), peg$c15 = 'False', peg$c16 = peg$literalExpectation('False', false), peg$c17 = function () {
|
|
142
|
+
return false;
|
|
143
|
+
}, peg$c18 = /^[^ \t\r\n,<>[\]{}()'"]/, peg$c19 = peg$classExpectation([' ', '\t', '\r', '\n', ',', '<', '>', '[', ']', '{', '}', '(', ')', "'", '"'], true, false), peg$c20 = "'", peg$c21 = peg$literalExpectation("'", false), peg$c22 = /^[^'\n\r]/, peg$c23 = peg$classExpectation(["'", '\n', '\r'], true, false), peg$c24 = '"', peg$c25 = peg$literalExpectation('"', false), peg$c26 = /^[^"\n\r]/, peg$c27 = peg$classExpectation(['"', '\n', '\r'], true, false), peg$c28 = function () {
|
|
144
|
+
return { quoted: true };
|
|
145
|
+
}, peg$c29 = /^[\-+]/, peg$c30 = peg$classExpectation(['-', '+'], false, false), peg$c31 = /^[0-9]/, peg$c32 = peg$classExpectation([['0', '9']], false, false), peg$c33 = '.', peg$c34 = peg$literalExpectation('.', false), peg$c35 = /^[eE]/, peg$c36 = peg$classExpectation(['e', 'E'], false, false), peg$c37 = /^[ \xA0\u2001\t\f\u2008]/, peg$c38 = peg$classExpectation([' ', '\xA0', '\u2001', '\t', '\f', '\u2008'], false, false), peg$c39 = /^[ \t\f]/, peg$c40 = peg$classExpectation([' ', '\t', '\f'], false, false), peg$c41 = /^[^>\r\n]/, peg$c42 = peg$classExpectation(['>', '\r', '\n'], true, false), peg$c43 = function (name, value) {
|
|
146
|
+
const advice = options.nestedAngleAdvice;
|
|
128
147
|
const rest = input.slice(peg$savedPos + text().length).split(/\r?\n/)[0];
|
|
129
|
-
const closedEarly =
|
|
148
|
+
const closedEarly = options.closedEarly(rest, options.inHash(location().start.offset));
|
|
130
149
|
if (value.indexOf('<') !== -1) {
|
|
131
150
|
options.diagnostics.push({
|
|
132
151
|
rule: 'attr-nested-angle',
|
|
@@ -144,11 +163,11 @@ function peg$parse(input, options) {
|
|
|
144
163
|
});
|
|
145
164
|
}
|
|
146
165
|
return null;
|
|
147
|
-
}, peg$
|
|
166
|
+
}, peg$c44 = function () {
|
|
148
167
|
return options._inDirective;
|
|
149
|
-
}, peg$
|
|
168
|
+
}, peg$c45 = /^[^'\r\n]/, peg$c46 = peg$classExpectation(["'", '\r', '\n'], true, false), peg$c47 = /^[^"\r\n]/, peg$c48 = peg$classExpectation(['"', '\r', '\n'], true, false), peg$c49 = '\uFF62', peg$c50 = peg$literalExpectation('\uFF62', false), peg$c51 = /^[^\uFF63\r\n]/, peg$c52 = peg$classExpectation(['\uFF63', '\r', '\n'], true, false), peg$c53 = '\uFF63', peg$c54 = peg$literalExpectation('\uFF63', false), peg$c55 = function () {
|
|
150
169
|
return null;
|
|
151
|
-
}, peg$
|
|
170
|
+
}, peg$c56 = '=begin', peg$c57 = peg$literalExpectation('=begin', false), peg$c58 = function (name) {
|
|
152
171
|
const top = options._blockStack[options._blockStack.length - 1];
|
|
153
172
|
const verbatim = top && options.isVerbatim(top.name);
|
|
154
173
|
if (verbatim) {
|
|
@@ -173,7 +192,7 @@ function peg$parse(input, options) {
|
|
|
173
192
|
options._blockStack.push({ name: name, location: location() });
|
|
174
193
|
options._inDirective = true;
|
|
175
194
|
return null;
|
|
176
|
-
}, peg$
|
|
195
|
+
}, peg$c59 = '=end', peg$c60 = peg$literalExpectation('=end', false), peg$c61 = function (name) {
|
|
177
196
|
const top = options._blockStack[options._blockStack.length - 1];
|
|
178
197
|
// a verbatim block runs to its own =end, so any other marker inside it is content
|
|
179
198
|
if (top && top.name !== name && options.isVerbatim(top.name)) {
|
|
@@ -232,10 +251,10 @@ function peg$parse(input, options) {
|
|
|
232
251
|
}
|
|
233
252
|
options._inDirective = false;
|
|
234
253
|
return null;
|
|
235
|
-
}, peg$
|
|
254
|
+
}, peg$c62 = '=for', peg$c63 = peg$literalExpectation('=for', false), peg$c64 = function () {
|
|
236
255
|
options._inDirective = true;
|
|
237
256
|
return null;
|
|
238
|
-
}, peg$
|
|
257
|
+
}, peg$c65 = '!', peg$c66 = peg$literalExpectation('!', false), peg$c67 = function (name) {
|
|
239
258
|
// any verbatim block on the stack makes this line content: markers written
|
|
240
259
|
// inside such a block are an example, not structure
|
|
241
260
|
const verbatim = options._blockStack.some(b => options.isVerbatim(b.name));
|
|
@@ -248,15 +267,15 @@ function peg$parse(input, options) {
|
|
|
248
267
|
});
|
|
249
268
|
}
|
|
250
269
|
return null;
|
|
251
|
-
}, peg$
|
|
270
|
+
}, peg$c68 = '(', peg$c69 = peg$literalExpectation('(', false), peg$c70 = '{', peg$c71 = peg$literalExpectation('{', false), peg$c72 = '[', peg$c73 = peg$literalExpectation('[', false), peg$c74 = '=', peg$c75 = peg$literalExpectation('=', false), peg$c76 = /^[ \t]/, peg$c77 = peg$classExpectation([' ', '\t'], false, false), peg$c78 = '\n', peg$c79 = peg$literalExpectation('\n', false), peg$c80 = function () {
|
|
252
271
|
options._inDirective = false;
|
|
253
272
|
return null;
|
|
254
|
-
}, peg$
|
|
273
|
+
}, peg$c81 = peg$otherExpectation('identifier'), peg$c82 = /^[a-zA-Z]/, peg$c83 = peg$classExpectation([
|
|
255
274
|
['a', 'z'],
|
|
256
275
|
['A', 'Z'],
|
|
257
|
-
], false, false), peg$
|
|
276
|
+
], false, false), peg$c84 = /^[a-zA-Z0-9_\-]/, peg$c85 = peg$classExpectation([['a', 'z'], ['A', 'Z'], ['0', '9'], '_', '-'], false, false), peg$c86 = peg$otherExpectation('start-of-line'), peg$c87 = function () {
|
|
258
277
|
return location().start.column === 1;
|
|
259
|
-
}, peg$
|
|
278
|
+
}, peg$c88 = peg$otherExpectation('whitespace'), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result;
|
|
260
279
|
if ('startRule' in options) {
|
|
261
280
|
if (!(options.startRule in peg$startRuleFunctions)) {
|
|
262
281
|
throw new Error('Can\'t start parsing from rule "' + options.startRule + '".');
|
|
@@ -315,117 +334,811 @@ function peg$parse(input, options) {
|
|
|
315
334
|
else {
|
|
316
335
|
details.column++;
|
|
317
336
|
}
|
|
318
|
-
p++;
|
|
337
|
+
p++;
|
|
338
|
+
}
|
|
339
|
+
peg$posDetailsCache[pos] = details;
|
|
340
|
+
return details;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
function peg$computeLocation(startPos, endPos) {
|
|
344
|
+
var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos);
|
|
345
|
+
return {
|
|
346
|
+
start: {
|
|
347
|
+
offset: startPos,
|
|
348
|
+
line: startPosDetails.line,
|
|
349
|
+
column: startPosDetails.column,
|
|
350
|
+
},
|
|
351
|
+
end: {
|
|
352
|
+
offset: endPos,
|
|
353
|
+
line: endPosDetails.line,
|
|
354
|
+
column: endPosDetails.column,
|
|
355
|
+
},
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
function peg$fail(expected) {
|
|
359
|
+
if (peg$currPos < peg$maxFailPos) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
if (peg$currPos > peg$maxFailPos) {
|
|
363
|
+
peg$maxFailPos = peg$currPos;
|
|
364
|
+
peg$maxFailExpected = [];
|
|
365
|
+
}
|
|
366
|
+
peg$maxFailExpected.push(expected);
|
|
367
|
+
}
|
|
368
|
+
function peg$buildSimpleError(message, location) {
|
|
369
|
+
return new peg$SyntaxError(message, null, null, location);
|
|
370
|
+
}
|
|
371
|
+
function peg$buildStructuredError(expected, found, location) {
|
|
372
|
+
return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location);
|
|
373
|
+
}
|
|
374
|
+
function peg$parsestart() {
|
|
375
|
+
var s0, s1;
|
|
376
|
+
s0 = [];
|
|
377
|
+
s1 = peg$parserule_match();
|
|
378
|
+
if (s1 === peg$FAILED) {
|
|
379
|
+
if (input.length > peg$currPos) {
|
|
380
|
+
s1 = input.charAt(peg$currPos);
|
|
381
|
+
peg$currPos++;
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
s1 = peg$FAILED;
|
|
385
|
+
if (peg$silentFails === 0) {
|
|
386
|
+
peg$fail(peg$c0);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
while (s1 !== peg$FAILED) {
|
|
391
|
+
s0.push(s1);
|
|
392
|
+
s1 = peg$parserule_match();
|
|
393
|
+
if (s1 === peg$FAILED) {
|
|
394
|
+
if (input.length > peg$currPos) {
|
|
395
|
+
s1 = input.charAt(peg$currPos);
|
|
396
|
+
peg$currPos++;
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
s1 = peg$FAILED;
|
|
400
|
+
if (peg$silentFails === 0) {
|
|
401
|
+
peg$fail(peg$c0);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
return s0;
|
|
407
|
+
}
|
|
408
|
+
function peg$parserule_match() {
|
|
409
|
+
var s0;
|
|
410
|
+
s0 = peg$parseattr_quoted_angle();
|
|
411
|
+
if (s0 === peg$FAILED) {
|
|
412
|
+
s0 = peg$parseattr_nested_angle();
|
|
413
|
+
if (s0 === peg$FAILED) {
|
|
414
|
+
s0 = peg$parsequoted_value();
|
|
415
|
+
if (s0 === peg$FAILED) {
|
|
416
|
+
s0 = peg$parsedelim_begin();
|
|
417
|
+
if (s0 === peg$FAILED) {
|
|
418
|
+
s0 = peg$parsedelim_end();
|
|
419
|
+
if (s0 === peg$FAILED) {
|
|
420
|
+
s0 = peg$parseparagraph_directive();
|
|
421
|
+
if (s0 === peg$FAILED) {
|
|
422
|
+
s0 = peg$parsecontinuation_attr();
|
|
423
|
+
if (s0 === peg$FAILED) {
|
|
424
|
+
s0 = peg$parsecontinuation_marker();
|
|
425
|
+
if (s0 === peg$FAILED) {
|
|
426
|
+
s0 = peg$parseblank_line_marker();
|
|
427
|
+
if (s0 === peg$FAILED) {
|
|
428
|
+
s0 = peg$parseline_marker();
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
return s0;
|
|
439
|
+
}
|
|
440
|
+
function peg$parseoption_start() {
|
|
441
|
+
var s0;
|
|
442
|
+
peg$savedPos = peg$currPos;
|
|
443
|
+
s0 = peg$c1();
|
|
444
|
+
if (s0) {
|
|
445
|
+
s0 = void 0;
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
s0 = peg$FAILED;
|
|
449
|
+
}
|
|
450
|
+
return s0;
|
|
451
|
+
}
|
|
452
|
+
function peg$parseattr_quoted_angle() {
|
|
453
|
+
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
|
|
454
|
+
s0 = peg$currPos;
|
|
455
|
+
s1 = peg$parseoption_start();
|
|
456
|
+
if (s1 !== peg$FAILED) {
|
|
457
|
+
if (input.charCodeAt(peg$currPos) === 58) {
|
|
458
|
+
s2 = peg$c2;
|
|
459
|
+
peg$currPos++;
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
s2 = peg$FAILED;
|
|
463
|
+
if (peg$silentFails === 0) {
|
|
464
|
+
peg$fail(peg$c3);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
if (s2 !== peg$FAILED) {
|
|
468
|
+
s3 = peg$parseidentifier();
|
|
469
|
+
if (s3 !== peg$FAILED) {
|
|
470
|
+
if (input.charCodeAt(peg$currPos) === 60) {
|
|
471
|
+
s4 = peg$c4;
|
|
472
|
+
peg$currPos++;
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
s4 = peg$FAILED;
|
|
476
|
+
if (peg$silentFails === 0) {
|
|
477
|
+
peg$fail(peg$c5);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
if (s4 !== peg$FAILED) {
|
|
481
|
+
s5 = peg$parseqa_ws();
|
|
482
|
+
if (s5 !== peg$FAILED) {
|
|
483
|
+
s6 = peg$parseqa_list();
|
|
484
|
+
if (s6 === peg$FAILED) {
|
|
485
|
+
s6 = peg$parseqa_quoted();
|
|
486
|
+
}
|
|
487
|
+
if (s6 !== peg$FAILED) {
|
|
488
|
+
s7 = peg$parseqa_ws();
|
|
489
|
+
if (s7 !== peg$FAILED) {
|
|
490
|
+
if (input.charCodeAt(peg$currPos) === 62) {
|
|
491
|
+
s8 = peg$c6;
|
|
492
|
+
peg$currPos++;
|
|
493
|
+
}
|
|
494
|
+
else {
|
|
495
|
+
s8 = peg$FAILED;
|
|
496
|
+
if (peg$silentFails === 0) {
|
|
497
|
+
peg$fail(peg$c7);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
if (s8 !== peg$FAILED) {
|
|
501
|
+
peg$savedPos = peg$currPos;
|
|
502
|
+
s9 = peg$c8(s6);
|
|
503
|
+
if (s9) {
|
|
504
|
+
s9 = void 0;
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
s9 = peg$FAILED;
|
|
508
|
+
}
|
|
509
|
+
if (s9 !== peg$FAILED) {
|
|
510
|
+
peg$savedPos = s0;
|
|
511
|
+
s1 = peg$c9(s6);
|
|
512
|
+
s0 = s1;
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
peg$currPos = s0;
|
|
516
|
+
s0 = peg$FAILED;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
peg$currPos = s0;
|
|
521
|
+
s0 = peg$FAILED;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
peg$currPos = s0;
|
|
526
|
+
s0 = peg$FAILED;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
peg$currPos = s0;
|
|
531
|
+
s0 = peg$FAILED;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
else {
|
|
535
|
+
peg$currPos = s0;
|
|
536
|
+
s0 = peg$FAILED;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
peg$currPos = s0;
|
|
541
|
+
s0 = peg$FAILED;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
peg$currPos = s0;
|
|
546
|
+
s0 = peg$FAILED;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
peg$currPos = s0;
|
|
551
|
+
s0 = peg$FAILED;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
else {
|
|
555
|
+
peg$currPos = s0;
|
|
556
|
+
s0 = peg$FAILED;
|
|
557
|
+
}
|
|
558
|
+
return s0;
|
|
559
|
+
}
|
|
560
|
+
function peg$parseqa_list() {
|
|
561
|
+
var s0, s1, s2, s3, s4, s5;
|
|
562
|
+
s0 = peg$currPos;
|
|
563
|
+
s1 = peg$parseqa_element();
|
|
564
|
+
if (s1 !== peg$FAILED) {
|
|
565
|
+
s2 = [];
|
|
566
|
+
s3 = peg$currPos;
|
|
567
|
+
s4 = [];
|
|
568
|
+
s5 = peg$parseqa_hs();
|
|
569
|
+
if (s5 !== peg$FAILED) {
|
|
570
|
+
while (s5 !== peg$FAILED) {
|
|
571
|
+
s4.push(s5);
|
|
572
|
+
s5 = peg$parseqa_hs();
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
s4 = peg$FAILED;
|
|
577
|
+
}
|
|
578
|
+
if (s4 !== peg$FAILED) {
|
|
579
|
+
s5 = peg$parseqa_element();
|
|
580
|
+
if (s5 !== peg$FAILED) {
|
|
581
|
+
peg$savedPos = s3;
|
|
582
|
+
s4 = peg$c10(s1, s5);
|
|
583
|
+
s3 = s4;
|
|
584
|
+
}
|
|
585
|
+
else {
|
|
586
|
+
peg$currPos = s3;
|
|
587
|
+
s3 = peg$FAILED;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
peg$currPos = s3;
|
|
592
|
+
s3 = peg$FAILED;
|
|
593
|
+
}
|
|
594
|
+
if (s3 !== peg$FAILED) {
|
|
595
|
+
while (s3 !== peg$FAILED) {
|
|
596
|
+
s2.push(s3);
|
|
597
|
+
s3 = peg$currPos;
|
|
598
|
+
s4 = [];
|
|
599
|
+
s5 = peg$parseqa_hs();
|
|
600
|
+
if (s5 !== peg$FAILED) {
|
|
601
|
+
while (s5 !== peg$FAILED) {
|
|
602
|
+
s4.push(s5);
|
|
603
|
+
s5 = peg$parseqa_hs();
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
else {
|
|
607
|
+
s4 = peg$FAILED;
|
|
608
|
+
}
|
|
609
|
+
if (s4 !== peg$FAILED) {
|
|
610
|
+
s5 = peg$parseqa_element();
|
|
611
|
+
if (s5 !== peg$FAILED) {
|
|
612
|
+
peg$savedPos = s3;
|
|
613
|
+
s4 = peg$c10(s1, s5);
|
|
614
|
+
s3 = s4;
|
|
615
|
+
}
|
|
616
|
+
else {
|
|
617
|
+
peg$currPos = s3;
|
|
618
|
+
s3 = peg$FAILED;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
else {
|
|
622
|
+
peg$currPos = s3;
|
|
623
|
+
s3 = peg$FAILED;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
else {
|
|
628
|
+
s2 = peg$FAILED;
|
|
629
|
+
}
|
|
630
|
+
if (s2 !== peg$FAILED) {
|
|
631
|
+
peg$savedPos = s0;
|
|
632
|
+
s1 = peg$c11(s1, s2);
|
|
633
|
+
s0 = s1;
|
|
634
|
+
}
|
|
635
|
+
else {
|
|
636
|
+
peg$currPos = s0;
|
|
637
|
+
s0 = peg$FAILED;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
else {
|
|
641
|
+
peg$currPos = s0;
|
|
642
|
+
s0 = peg$FAILED;
|
|
643
|
+
}
|
|
644
|
+
return s0;
|
|
645
|
+
}
|
|
646
|
+
function peg$parseqa_element() {
|
|
647
|
+
var s0, s1, s2;
|
|
648
|
+
s0 = peg$currPos;
|
|
649
|
+
s1 = peg$parseqa_quoted();
|
|
650
|
+
if (s1 !== peg$FAILED) {
|
|
651
|
+
peg$savedPos = s0;
|
|
652
|
+
s1 = peg$c12();
|
|
653
|
+
}
|
|
654
|
+
s0 = s1;
|
|
655
|
+
if (s0 === peg$FAILED) {
|
|
656
|
+
s0 = peg$currPos;
|
|
657
|
+
if (input.substr(peg$currPos, 4) === peg$c13) {
|
|
658
|
+
s1 = peg$c13;
|
|
659
|
+
peg$currPos += 4;
|
|
660
|
+
}
|
|
661
|
+
else {
|
|
662
|
+
s1 = peg$FAILED;
|
|
663
|
+
if (peg$silentFails === 0) {
|
|
664
|
+
peg$fail(peg$c14);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
if (s1 === peg$FAILED) {
|
|
668
|
+
if (input.substr(peg$currPos, 5) === peg$c15) {
|
|
669
|
+
s1 = peg$c15;
|
|
670
|
+
peg$currPos += 5;
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
s1 = peg$FAILED;
|
|
674
|
+
if (peg$silentFails === 0) {
|
|
675
|
+
peg$fail(peg$c16);
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
if (s1 === peg$FAILED) {
|
|
679
|
+
s1 = peg$parseqa_float();
|
|
680
|
+
if (s1 === peg$FAILED) {
|
|
681
|
+
s1 = peg$parseqa_number();
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
if (s1 !== peg$FAILED) {
|
|
686
|
+
peg$savedPos = s0;
|
|
687
|
+
s1 = peg$c17();
|
|
688
|
+
}
|
|
689
|
+
s0 = s1;
|
|
690
|
+
if (s0 === peg$FAILED) {
|
|
691
|
+
s0 = peg$currPos;
|
|
692
|
+
s1 = [];
|
|
693
|
+
if (peg$c18.test(input.charAt(peg$currPos))) {
|
|
694
|
+
s2 = input.charAt(peg$currPos);
|
|
695
|
+
peg$currPos++;
|
|
696
|
+
}
|
|
697
|
+
else {
|
|
698
|
+
s2 = peg$FAILED;
|
|
699
|
+
if (peg$silentFails === 0) {
|
|
700
|
+
peg$fail(peg$c19);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
if (s2 !== peg$FAILED) {
|
|
704
|
+
while (s2 !== peg$FAILED) {
|
|
705
|
+
s1.push(s2);
|
|
706
|
+
if (peg$c18.test(input.charAt(peg$currPos))) {
|
|
707
|
+
s2 = input.charAt(peg$currPos);
|
|
708
|
+
peg$currPos++;
|
|
709
|
+
}
|
|
710
|
+
else {
|
|
711
|
+
s2 = peg$FAILED;
|
|
712
|
+
if (peg$silentFails === 0) {
|
|
713
|
+
peg$fail(peg$c19);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
else {
|
|
719
|
+
s1 = peg$FAILED;
|
|
720
|
+
}
|
|
721
|
+
if (s1 !== peg$FAILED) {
|
|
722
|
+
peg$savedPos = s0;
|
|
723
|
+
s1 = peg$c17();
|
|
724
|
+
}
|
|
725
|
+
s0 = s1;
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
return s0;
|
|
729
|
+
}
|
|
730
|
+
function peg$parseqa_quoted() {
|
|
731
|
+
var s0, s1, s2, s3, s4;
|
|
732
|
+
s0 = peg$currPos;
|
|
733
|
+
s1 = peg$currPos;
|
|
734
|
+
if (input.charCodeAt(peg$currPos) === 39) {
|
|
735
|
+
s2 = peg$c20;
|
|
736
|
+
peg$currPos++;
|
|
737
|
+
}
|
|
738
|
+
else {
|
|
739
|
+
s2 = peg$FAILED;
|
|
740
|
+
if (peg$silentFails === 0) {
|
|
741
|
+
peg$fail(peg$c21);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
if (s2 !== peg$FAILED) {
|
|
745
|
+
s3 = [];
|
|
746
|
+
if (peg$c22.test(input.charAt(peg$currPos))) {
|
|
747
|
+
s4 = input.charAt(peg$currPos);
|
|
748
|
+
peg$currPos++;
|
|
749
|
+
}
|
|
750
|
+
else {
|
|
751
|
+
s4 = peg$FAILED;
|
|
752
|
+
if (peg$silentFails === 0) {
|
|
753
|
+
peg$fail(peg$c23);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
while (s4 !== peg$FAILED) {
|
|
757
|
+
s3.push(s4);
|
|
758
|
+
if (peg$c22.test(input.charAt(peg$currPos))) {
|
|
759
|
+
s4 = input.charAt(peg$currPos);
|
|
760
|
+
peg$currPos++;
|
|
761
|
+
}
|
|
762
|
+
else {
|
|
763
|
+
s4 = peg$FAILED;
|
|
764
|
+
if (peg$silentFails === 0) {
|
|
765
|
+
peg$fail(peg$c23);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
if (s3 !== peg$FAILED) {
|
|
770
|
+
if (input.charCodeAt(peg$currPos) === 39) {
|
|
771
|
+
s4 = peg$c20;
|
|
772
|
+
peg$currPos++;
|
|
773
|
+
}
|
|
774
|
+
else {
|
|
775
|
+
s4 = peg$FAILED;
|
|
776
|
+
if (peg$silentFails === 0) {
|
|
777
|
+
peg$fail(peg$c21);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
if (s4 !== peg$FAILED) {
|
|
781
|
+
s2 = [s2, s3, s4];
|
|
782
|
+
s1 = s2;
|
|
783
|
+
}
|
|
784
|
+
else {
|
|
785
|
+
peg$currPos = s1;
|
|
786
|
+
s1 = peg$FAILED;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
else {
|
|
790
|
+
peg$currPos = s1;
|
|
791
|
+
s1 = peg$FAILED;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
else {
|
|
795
|
+
peg$currPos = s1;
|
|
796
|
+
s1 = peg$FAILED;
|
|
797
|
+
}
|
|
798
|
+
if (s1 === peg$FAILED) {
|
|
799
|
+
s1 = peg$currPos;
|
|
800
|
+
if (input.charCodeAt(peg$currPos) === 34) {
|
|
801
|
+
s2 = peg$c24;
|
|
802
|
+
peg$currPos++;
|
|
803
|
+
}
|
|
804
|
+
else {
|
|
805
|
+
s2 = peg$FAILED;
|
|
806
|
+
if (peg$silentFails === 0) {
|
|
807
|
+
peg$fail(peg$c25);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
if (s2 !== peg$FAILED) {
|
|
811
|
+
s3 = [];
|
|
812
|
+
if (peg$c26.test(input.charAt(peg$currPos))) {
|
|
813
|
+
s4 = input.charAt(peg$currPos);
|
|
814
|
+
peg$currPos++;
|
|
815
|
+
}
|
|
816
|
+
else {
|
|
817
|
+
s4 = peg$FAILED;
|
|
818
|
+
if (peg$silentFails === 0) {
|
|
819
|
+
peg$fail(peg$c27);
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
while (s4 !== peg$FAILED) {
|
|
823
|
+
s3.push(s4);
|
|
824
|
+
if (peg$c26.test(input.charAt(peg$currPos))) {
|
|
825
|
+
s4 = input.charAt(peg$currPos);
|
|
826
|
+
peg$currPos++;
|
|
827
|
+
}
|
|
828
|
+
else {
|
|
829
|
+
s4 = peg$FAILED;
|
|
830
|
+
if (peg$silentFails === 0) {
|
|
831
|
+
peg$fail(peg$c27);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
if (s3 !== peg$FAILED) {
|
|
836
|
+
if (input.charCodeAt(peg$currPos) === 34) {
|
|
837
|
+
s4 = peg$c24;
|
|
838
|
+
peg$currPos++;
|
|
839
|
+
}
|
|
840
|
+
else {
|
|
841
|
+
s4 = peg$FAILED;
|
|
842
|
+
if (peg$silentFails === 0) {
|
|
843
|
+
peg$fail(peg$c25);
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
if (s4 !== peg$FAILED) {
|
|
847
|
+
s2 = [s2, s3, s4];
|
|
848
|
+
s1 = s2;
|
|
849
|
+
}
|
|
850
|
+
else {
|
|
851
|
+
peg$currPos = s1;
|
|
852
|
+
s1 = peg$FAILED;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
else {
|
|
856
|
+
peg$currPos = s1;
|
|
857
|
+
s1 = peg$FAILED;
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
else {
|
|
861
|
+
peg$currPos = s1;
|
|
862
|
+
s1 = peg$FAILED;
|
|
319
863
|
}
|
|
320
|
-
peg$posDetailsCache[pos] = details;
|
|
321
|
-
return details;
|
|
322
864
|
}
|
|
865
|
+
if (s1 !== peg$FAILED) {
|
|
866
|
+
peg$savedPos = s0;
|
|
867
|
+
s1 = peg$c28();
|
|
868
|
+
}
|
|
869
|
+
s0 = s1;
|
|
870
|
+
return s0;
|
|
323
871
|
}
|
|
324
|
-
function peg$
|
|
325
|
-
var
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
column: startPosDetails.column,
|
|
331
|
-
},
|
|
332
|
-
end: {
|
|
333
|
-
offset: endPos,
|
|
334
|
-
line: endPosDetails.line,
|
|
335
|
-
column: endPosDetails.column,
|
|
336
|
-
},
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
function peg$fail(expected) {
|
|
340
|
-
if (peg$currPos < peg$maxFailPos) {
|
|
341
|
-
return;
|
|
872
|
+
function peg$parseqa_number() {
|
|
873
|
+
var s0, s1, s2, s3;
|
|
874
|
+
s0 = peg$currPos;
|
|
875
|
+
if (peg$c29.test(input.charAt(peg$currPos))) {
|
|
876
|
+
s1 = input.charAt(peg$currPos);
|
|
877
|
+
peg$currPos++;
|
|
342
878
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
peg$
|
|
879
|
+
else {
|
|
880
|
+
s1 = peg$FAILED;
|
|
881
|
+
if (peg$silentFails === 0) {
|
|
882
|
+
peg$fail(peg$c30);
|
|
883
|
+
}
|
|
346
884
|
}
|
|
347
|
-
peg$maxFailExpected.push(expected);
|
|
348
|
-
}
|
|
349
|
-
function peg$buildSimpleError(message, location) {
|
|
350
|
-
return new peg$SyntaxError(message, null, null, location);
|
|
351
|
-
}
|
|
352
|
-
function peg$buildStructuredError(expected, found, location) {
|
|
353
|
-
return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location);
|
|
354
|
-
}
|
|
355
|
-
function peg$parsestart() {
|
|
356
|
-
var s0, s1;
|
|
357
|
-
s0 = [];
|
|
358
|
-
s1 = peg$parserule_match();
|
|
359
885
|
if (s1 === peg$FAILED) {
|
|
360
|
-
|
|
361
|
-
|
|
886
|
+
s1 = null;
|
|
887
|
+
}
|
|
888
|
+
if (s1 !== peg$FAILED) {
|
|
889
|
+
s2 = [];
|
|
890
|
+
if (peg$c31.test(input.charAt(peg$currPos))) {
|
|
891
|
+
s3 = input.charAt(peg$currPos);
|
|
362
892
|
peg$currPos++;
|
|
363
893
|
}
|
|
364
894
|
else {
|
|
365
|
-
|
|
895
|
+
s3 = peg$FAILED;
|
|
366
896
|
if (peg$silentFails === 0) {
|
|
367
|
-
peg$fail(peg$
|
|
897
|
+
peg$fail(peg$c32);
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
if (s3 !== peg$FAILED) {
|
|
901
|
+
while (s3 !== peg$FAILED) {
|
|
902
|
+
s2.push(s3);
|
|
903
|
+
if (peg$c31.test(input.charAt(peg$currPos))) {
|
|
904
|
+
s3 = input.charAt(peg$currPos);
|
|
905
|
+
peg$currPos++;
|
|
906
|
+
}
|
|
907
|
+
else {
|
|
908
|
+
s3 = peg$FAILED;
|
|
909
|
+
if (peg$silentFails === 0) {
|
|
910
|
+
peg$fail(peg$c32);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
368
913
|
}
|
|
369
914
|
}
|
|
915
|
+
else {
|
|
916
|
+
s2 = peg$FAILED;
|
|
917
|
+
}
|
|
918
|
+
if (s2 !== peg$FAILED) {
|
|
919
|
+
s1 = [s1, s2];
|
|
920
|
+
s0 = s1;
|
|
921
|
+
}
|
|
922
|
+
else {
|
|
923
|
+
peg$currPos = s0;
|
|
924
|
+
s0 = peg$FAILED;
|
|
925
|
+
}
|
|
370
926
|
}
|
|
371
|
-
|
|
372
|
-
s0
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
927
|
+
else {
|
|
928
|
+
peg$currPos = s0;
|
|
929
|
+
s0 = peg$FAILED;
|
|
930
|
+
}
|
|
931
|
+
return s0;
|
|
932
|
+
}
|
|
933
|
+
function peg$parseqa_float() {
|
|
934
|
+
var s0, s1, s2, s3, s4, s5;
|
|
935
|
+
s0 = peg$currPos;
|
|
936
|
+
s1 = peg$parseqa_number();
|
|
937
|
+
if (s1 !== peg$FAILED) {
|
|
938
|
+
s2 = peg$currPos;
|
|
939
|
+
if (input.charCodeAt(peg$currPos) === 46) {
|
|
940
|
+
s3 = peg$c33;
|
|
941
|
+
peg$currPos++;
|
|
942
|
+
}
|
|
943
|
+
else {
|
|
944
|
+
s3 = peg$FAILED;
|
|
945
|
+
if (peg$silentFails === 0) {
|
|
946
|
+
peg$fail(peg$c34);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
if (s3 !== peg$FAILED) {
|
|
950
|
+
s4 = [];
|
|
951
|
+
if (peg$c31.test(input.charAt(peg$currPos))) {
|
|
952
|
+
s5 = input.charAt(peg$currPos);
|
|
377
953
|
peg$currPos++;
|
|
378
954
|
}
|
|
379
955
|
else {
|
|
380
|
-
|
|
956
|
+
s5 = peg$FAILED;
|
|
381
957
|
if (peg$silentFails === 0) {
|
|
382
|
-
peg$fail(peg$
|
|
958
|
+
peg$fail(peg$c32);
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
if (s5 !== peg$FAILED) {
|
|
962
|
+
while (s5 !== peg$FAILED) {
|
|
963
|
+
s4.push(s5);
|
|
964
|
+
if (peg$c31.test(input.charAt(peg$currPos))) {
|
|
965
|
+
s5 = input.charAt(peg$currPos);
|
|
966
|
+
peg$currPos++;
|
|
967
|
+
}
|
|
968
|
+
else {
|
|
969
|
+
s5 = peg$FAILED;
|
|
970
|
+
if (peg$silentFails === 0) {
|
|
971
|
+
peg$fail(peg$c32);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
s4 = peg$FAILED;
|
|
978
|
+
}
|
|
979
|
+
if (s4 !== peg$FAILED) {
|
|
980
|
+
s3 = [s3, s4];
|
|
981
|
+
s2 = s3;
|
|
982
|
+
}
|
|
983
|
+
else {
|
|
984
|
+
peg$currPos = s2;
|
|
985
|
+
s2 = peg$FAILED;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
else {
|
|
989
|
+
peg$currPos = s2;
|
|
990
|
+
s2 = peg$FAILED;
|
|
991
|
+
}
|
|
992
|
+
if (s2 === peg$FAILED) {
|
|
993
|
+
s2 = null;
|
|
994
|
+
}
|
|
995
|
+
if (s2 !== peg$FAILED) {
|
|
996
|
+
if (peg$c35.test(input.charAt(peg$currPos))) {
|
|
997
|
+
s3 = input.charAt(peg$currPos);
|
|
998
|
+
peg$currPos++;
|
|
999
|
+
}
|
|
1000
|
+
else {
|
|
1001
|
+
s3 = peg$FAILED;
|
|
1002
|
+
if (peg$silentFails === 0) {
|
|
1003
|
+
peg$fail(peg$c36);
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
if (s3 !== peg$FAILED) {
|
|
1007
|
+
s4 = peg$parseqa_number();
|
|
1008
|
+
if (s4 !== peg$FAILED) {
|
|
1009
|
+
s1 = [s1, s2, s3, s4];
|
|
1010
|
+
s0 = s1;
|
|
1011
|
+
}
|
|
1012
|
+
else {
|
|
1013
|
+
peg$currPos = s0;
|
|
1014
|
+
s0 = peg$FAILED;
|
|
383
1015
|
}
|
|
384
1016
|
}
|
|
1017
|
+
else {
|
|
1018
|
+
peg$currPos = s0;
|
|
1019
|
+
s0 = peg$FAILED;
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
else {
|
|
1023
|
+
peg$currPos = s0;
|
|
1024
|
+
s0 = peg$FAILED;
|
|
385
1025
|
}
|
|
386
1026
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
s0 = peg$parseattr_nested_angle();
|
|
1027
|
+
else {
|
|
1028
|
+
peg$currPos = s0;
|
|
1029
|
+
s0 = peg$FAILED;
|
|
1030
|
+
}
|
|
392
1031
|
if (s0 === peg$FAILED) {
|
|
393
|
-
s0 = peg$
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
if (
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
1032
|
+
s0 = peg$currPos;
|
|
1033
|
+
s1 = peg$parseqa_number();
|
|
1034
|
+
if (s1 !== peg$FAILED) {
|
|
1035
|
+
if (input.charCodeAt(peg$currPos) === 46) {
|
|
1036
|
+
s2 = peg$c33;
|
|
1037
|
+
peg$currPos++;
|
|
1038
|
+
}
|
|
1039
|
+
else {
|
|
1040
|
+
s2 = peg$FAILED;
|
|
1041
|
+
if (peg$silentFails === 0) {
|
|
1042
|
+
peg$fail(peg$c34);
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
if (s2 !== peg$FAILED) {
|
|
1046
|
+
s3 = [];
|
|
1047
|
+
if (peg$c31.test(input.charAt(peg$currPos))) {
|
|
1048
|
+
s4 = input.charAt(peg$currPos);
|
|
1049
|
+
peg$currPos++;
|
|
1050
|
+
}
|
|
1051
|
+
else {
|
|
1052
|
+
s4 = peg$FAILED;
|
|
1053
|
+
if (peg$silentFails === 0) {
|
|
1054
|
+
peg$fail(peg$c32);
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
if (s4 !== peg$FAILED) {
|
|
1058
|
+
while (s4 !== peg$FAILED) {
|
|
1059
|
+
s3.push(s4);
|
|
1060
|
+
if (peg$c31.test(input.charAt(peg$currPos))) {
|
|
1061
|
+
s4 = input.charAt(peg$currPos);
|
|
1062
|
+
peg$currPos++;
|
|
1063
|
+
}
|
|
1064
|
+
else {
|
|
1065
|
+
s4 = peg$FAILED;
|
|
1066
|
+
if (peg$silentFails === 0) {
|
|
1067
|
+
peg$fail(peg$c32);
|
|
409
1068
|
}
|
|
410
1069
|
}
|
|
411
1070
|
}
|
|
412
1071
|
}
|
|
1072
|
+
else {
|
|
1073
|
+
s3 = peg$FAILED;
|
|
1074
|
+
}
|
|
1075
|
+
if (s3 !== peg$FAILED) {
|
|
1076
|
+
s1 = [s1, s2, s3];
|
|
1077
|
+
s0 = s1;
|
|
1078
|
+
}
|
|
1079
|
+
else {
|
|
1080
|
+
peg$currPos = s0;
|
|
1081
|
+
s0 = peg$FAILED;
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
else {
|
|
1085
|
+
peg$currPos = s0;
|
|
1086
|
+
s0 = peg$FAILED;
|
|
413
1087
|
}
|
|
414
1088
|
}
|
|
1089
|
+
else {
|
|
1090
|
+
peg$currPos = s0;
|
|
1091
|
+
s0 = peg$FAILED;
|
|
1092
|
+
}
|
|
415
1093
|
}
|
|
416
1094
|
return s0;
|
|
417
1095
|
}
|
|
418
|
-
function peg$
|
|
419
|
-
var s0
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
1096
|
+
function peg$parseqa_hs() {
|
|
1097
|
+
var s0;
|
|
1098
|
+
if (peg$c37.test(input.charAt(peg$currPos))) {
|
|
1099
|
+
s0 = input.charAt(peg$currPos);
|
|
1100
|
+
peg$currPos++;
|
|
1101
|
+
}
|
|
1102
|
+
else {
|
|
1103
|
+
s0 = peg$FAILED;
|
|
1104
|
+
if (peg$silentFails === 0) {
|
|
1105
|
+
peg$fail(peg$c38);
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
return s0;
|
|
1109
|
+
}
|
|
1110
|
+
function peg$parseqa_ws() {
|
|
1111
|
+
var s0, s1;
|
|
1112
|
+
s0 = [];
|
|
1113
|
+
if (peg$c39.test(input.charAt(peg$currPos))) {
|
|
1114
|
+
s1 = input.charAt(peg$currPos);
|
|
1115
|
+
peg$currPos++;
|
|
425
1116
|
}
|
|
426
1117
|
else {
|
|
427
1118
|
s1 = peg$FAILED;
|
|
1119
|
+
if (peg$silentFails === 0) {
|
|
1120
|
+
peg$fail(peg$c40);
|
|
1121
|
+
}
|
|
428
1122
|
}
|
|
1123
|
+
while (s1 !== peg$FAILED) {
|
|
1124
|
+
s0.push(s1);
|
|
1125
|
+
if (peg$c39.test(input.charAt(peg$currPos))) {
|
|
1126
|
+
s1 = input.charAt(peg$currPos);
|
|
1127
|
+
peg$currPos++;
|
|
1128
|
+
}
|
|
1129
|
+
else {
|
|
1130
|
+
s1 = peg$FAILED;
|
|
1131
|
+
if (peg$silentFails === 0) {
|
|
1132
|
+
peg$fail(peg$c40);
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
return s0;
|
|
1137
|
+
}
|
|
1138
|
+
function peg$parseattr_nested_angle() {
|
|
1139
|
+
var s0, s1, s2, s3, s4, s5, s6, s7, s8;
|
|
1140
|
+
s0 = peg$currPos;
|
|
1141
|
+
s1 = peg$parseoption_start();
|
|
429
1142
|
if (s1 !== peg$FAILED) {
|
|
430
1143
|
if (input.charCodeAt(peg$currPos) === 58) {
|
|
431
1144
|
s2 = peg$c2;
|
|
@@ -474,26 +1187,26 @@ function peg$parse(input, options) {
|
|
|
474
1187
|
if (s5 !== peg$FAILED) {
|
|
475
1188
|
s6 = peg$currPos;
|
|
476
1189
|
s7 = [];
|
|
477
|
-
if (peg$
|
|
1190
|
+
if (peg$c41.test(input.charAt(peg$currPos))) {
|
|
478
1191
|
s8 = input.charAt(peg$currPos);
|
|
479
1192
|
peg$currPos++;
|
|
480
1193
|
}
|
|
481
1194
|
else {
|
|
482
1195
|
s8 = peg$FAILED;
|
|
483
1196
|
if (peg$silentFails === 0) {
|
|
484
|
-
peg$fail(peg$
|
|
1197
|
+
peg$fail(peg$c42);
|
|
485
1198
|
}
|
|
486
1199
|
}
|
|
487
1200
|
while (s8 !== peg$FAILED) {
|
|
488
1201
|
s7.push(s8);
|
|
489
|
-
if (peg$
|
|
1202
|
+
if (peg$c41.test(input.charAt(peg$currPos))) {
|
|
490
1203
|
s8 = input.charAt(peg$currPos);
|
|
491
1204
|
peg$currPos++;
|
|
492
1205
|
}
|
|
493
1206
|
else {
|
|
494
1207
|
s8 = peg$FAILED;
|
|
495
1208
|
if (peg$silentFails === 0) {
|
|
496
|
-
peg$fail(peg$
|
|
1209
|
+
peg$fail(peg$c42);
|
|
497
1210
|
}
|
|
498
1211
|
}
|
|
499
1212
|
}
|
|
@@ -505,18 +1218,18 @@ function peg$parse(input, options) {
|
|
|
505
1218
|
}
|
|
506
1219
|
if (s6 !== peg$FAILED) {
|
|
507
1220
|
if (input.charCodeAt(peg$currPos) === 62) {
|
|
508
|
-
s7 = peg$
|
|
1221
|
+
s7 = peg$c6;
|
|
509
1222
|
peg$currPos++;
|
|
510
1223
|
}
|
|
511
1224
|
else {
|
|
512
1225
|
s7 = peg$FAILED;
|
|
513
1226
|
if (peg$silentFails === 0) {
|
|
514
|
-
peg$fail(peg$
|
|
1227
|
+
peg$fail(peg$c7);
|
|
515
1228
|
}
|
|
516
1229
|
}
|
|
517
1230
|
if (s7 !== peg$FAILED) {
|
|
518
1231
|
peg$savedPos = s0;
|
|
519
|
-
s1 = peg$
|
|
1232
|
+
s1 = peg$c43(s3, s6);
|
|
520
1233
|
s0 = s1;
|
|
521
1234
|
}
|
|
522
1235
|
else {
|
|
@@ -571,7 +1284,7 @@ function peg$parse(input, options) {
|
|
|
571
1284
|
}
|
|
572
1285
|
if (s1 !== peg$FAILED) {
|
|
573
1286
|
peg$savedPos = peg$currPos;
|
|
574
|
-
s2 = peg$
|
|
1287
|
+
s2 = peg$c44();
|
|
575
1288
|
if (s2) {
|
|
576
1289
|
s2 = void 0;
|
|
577
1290
|
}
|
|
@@ -581,49 +1294,49 @@ function peg$parse(input, options) {
|
|
|
581
1294
|
if (s2 !== peg$FAILED) {
|
|
582
1295
|
s3 = peg$currPos;
|
|
583
1296
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
584
|
-
s4 = peg$
|
|
1297
|
+
s4 = peg$c20;
|
|
585
1298
|
peg$currPos++;
|
|
586
1299
|
}
|
|
587
1300
|
else {
|
|
588
1301
|
s4 = peg$FAILED;
|
|
589
1302
|
if (peg$silentFails === 0) {
|
|
590
|
-
peg$fail(peg$
|
|
1303
|
+
peg$fail(peg$c21);
|
|
591
1304
|
}
|
|
592
1305
|
}
|
|
593
1306
|
if (s4 !== peg$FAILED) {
|
|
594
1307
|
s5 = [];
|
|
595
|
-
if (peg$
|
|
1308
|
+
if (peg$c45.test(input.charAt(peg$currPos))) {
|
|
596
1309
|
s6 = input.charAt(peg$currPos);
|
|
597
1310
|
peg$currPos++;
|
|
598
1311
|
}
|
|
599
1312
|
else {
|
|
600
1313
|
s6 = peg$FAILED;
|
|
601
1314
|
if (peg$silentFails === 0) {
|
|
602
|
-
peg$fail(peg$
|
|
1315
|
+
peg$fail(peg$c46);
|
|
603
1316
|
}
|
|
604
1317
|
}
|
|
605
1318
|
while (s6 !== peg$FAILED) {
|
|
606
1319
|
s5.push(s6);
|
|
607
|
-
if (peg$
|
|
1320
|
+
if (peg$c45.test(input.charAt(peg$currPos))) {
|
|
608
1321
|
s6 = input.charAt(peg$currPos);
|
|
609
1322
|
peg$currPos++;
|
|
610
1323
|
}
|
|
611
1324
|
else {
|
|
612
1325
|
s6 = peg$FAILED;
|
|
613
1326
|
if (peg$silentFails === 0) {
|
|
614
|
-
peg$fail(peg$
|
|
1327
|
+
peg$fail(peg$c46);
|
|
615
1328
|
}
|
|
616
1329
|
}
|
|
617
1330
|
}
|
|
618
1331
|
if (s5 !== peg$FAILED) {
|
|
619
1332
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
620
|
-
s6 = peg$
|
|
1333
|
+
s6 = peg$c20;
|
|
621
1334
|
peg$currPos++;
|
|
622
1335
|
}
|
|
623
1336
|
else {
|
|
624
1337
|
s6 = peg$FAILED;
|
|
625
1338
|
if (peg$silentFails === 0) {
|
|
626
|
-
peg$fail(peg$
|
|
1339
|
+
peg$fail(peg$c21);
|
|
627
1340
|
}
|
|
628
1341
|
}
|
|
629
1342
|
if (s6 !== peg$FAILED) {
|
|
@@ -647,49 +1360,49 @@ function peg$parse(input, options) {
|
|
|
647
1360
|
if (s3 === peg$FAILED) {
|
|
648
1361
|
s3 = peg$currPos;
|
|
649
1362
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
650
|
-
s4 = peg$
|
|
1363
|
+
s4 = peg$c24;
|
|
651
1364
|
peg$currPos++;
|
|
652
1365
|
}
|
|
653
1366
|
else {
|
|
654
1367
|
s4 = peg$FAILED;
|
|
655
1368
|
if (peg$silentFails === 0) {
|
|
656
|
-
peg$fail(peg$
|
|
1369
|
+
peg$fail(peg$c25);
|
|
657
1370
|
}
|
|
658
1371
|
}
|
|
659
1372
|
if (s4 !== peg$FAILED) {
|
|
660
1373
|
s5 = [];
|
|
661
|
-
if (peg$
|
|
1374
|
+
if (peg$c47.test(input.charAt(peg$currPos))) {
|
|
662
1375
|
s6 = input.charAt(peg$currPos);
|
|
663
1376
|
peg$currPos++;
|
|
664
1377
|
}
|
|
665
1378
|
else {
|
|
666
1379
|
s6 = peg$FAILED;
|
|
667
1380
|
if (peg$silentFails === 0) {
|
|
668
|
-
peg$fail(peg$
|
|
1381
|
+
peg$fail(peg$c48);
|
|
669
1382
|
}
|
|
670
1383
|
}
|
|
671
1384
|
while (s6 !== peg$FAILED) {
|
|
672
1385
|
s5.push(s6);
|
|
673
|
-
if (peg$
|
|
1386
|
+
if (peg$c47.test(input.charAt(peg$currPos))) {
|
|
674
1387
|
s6 = input.charAt(peg$currPos);
|
|
675
1388
|
peg$currPos++;
|
|
676
1389
|
}
|
|
677
1390
|
else {
|
|
678
1391
|
s6 = peg$FAILED;
|
|
679
1392
|
if (peg$silentFails === 0) {
|
|
680
|
-
peg$fail(peg$
|
|
1393
|
+
peg$fail(peg$c48);
|
|
681
1394
|
}
|
|
682
1395
|
}
|
|
683
1396
|
}
|
|
684
1397
|
if (s5 !== peg$FAILED) {
|
|
685
1398
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
686
|
-
s6 = peg$
|
|
1399
|
+
s6 = peg$c24;
|
|
687
1400
|
peg$currPos++;
|
|
688
1401
|
}
|
|
689
1402
|
else {
|
|
690
1403
|
s6 = peg$FAILED;
|
|
691
1404
|
if (peg$silentFails === 0) {
|
|
692
|
-
peg$fail(peg$
|
|
1405
|
+
peg$fail(peg$c25);
|
|
693
1406
|
}
|
|
694
1407
|
}
|
|
695
1408
|
if (s6 !== peg$FAILED) {
|
|
@@ -713,49 +1426,49 @@ function peg$parse(input, options) {
|
|
|
713
1426
|
if (s3 === peg$FAILED) {
|
|
714
1427
|
s3 = peg$currPos;
|
|
715
1428
|
if (input.charCodeAt(peg$currPos) === 65378) {
|
|
716
|
-
s4 = peg$
|
|
1429
|
+
s4 = peg$c49;
|
|
717
1430
|
peg$currPos++;
|
|
718
1431
|
}
|
|
719
1432
|
else {
|
|
720
1433
|
s4 = peg$FAILED;
|
|
721
1434
|
if (peg$silentFails === 0) {
|
|
722
|
-
peg$fail(peg$
|
|
1435
|
+
peg$fail(peg$c50);
|
|
723
1436
|
}
|
|
724
1437
|
}
|
|
725
1438
|
if (s4 !== peg$FAILED) {
|
|
726
1439
|
s5 = [];
|
|
727
|
-
if (peg$
|
|
1440
|
+
if (peg$c51.test(input.charAt(peg$currPos))) {
|
|
728
1441
|
s6 = input.charAt(peg$currPos);
|
|
729
1442
|
peg$currPos++;
|
|
730
1443
|
}
|
|
731
1444
|
else {
|
|
732
1445
|
s6 = peg$FAILED;
|
|
733
1446
|
if (peg$silentFails === 0) {
|
|
734
|
-
peg$fail(peg$
|
|
1447
|
+
peg$fail(peg$c52);
|
|
735
1448
|
}
|
|
736
1449
|
}
|
|
737
1450
|
while (s6 !== peg$FAILED) {
|
|
738
1451
|
s5.push(s6);
|
|
739
|
-
if (peg$
|
|
1452
|
+
if (peg$c51.test(input.charAt(peg$currPos))) {
|
|
740
1453
|
s6 = input.charAt(peg$currPos);
|
|
741
1454
|
peg$currPos++;
|
|
742
1455
|
}
|
|
743
1456
|
else {
|
|
744
1457
|
s6 = peg$FAILED;
|
|
745
1458
|
if (peg$silentFails === 0) {
|
|
746
|
-
peg$fail(peg$
|
|
1459
|
+
peg$fail(peg$c52);
|
|
747
1460
|
}
|
|
748
1461
|
}
|
|
749
1462
|
}
|
|
750
1463
|
if (s5 !== peg$FAILED) {
|
|
751
1464
|
if (input.charCodeAt(peg$currPos) === 65379) {
|
|
752
|
-
s6 = peg$
|
|
1465
|
+
s6 = peg$c53;
|
|
753
1466
|
peg$currPos++;
|
|
754
1467
|
}
|
|
755
1468
|
else {
|
|
756
1469
|
s6 = peg$FAILED;
|
|
757
1470
|
if (peg$silentFails === 0) {
|
|
758
|
-
peg$fail(peg$
|
|
1471
|
+
peg$fail(peg$c54);
|
|
759
1472
|
}
|
|
760
1473
|
}
|
|
761
1474
|
if (s6 !== peg$FAILED) {
|
|
@@ -780,7 +1493,7 @@ function peg$parse(input, options) {
|
|
|
780
1493
|
}
|
|
781
1494
|
if (s3 !== peg$FAILED) {
|
|
782
1495
|
peg$savedPos = s0;
|
|
783
|
-
s1 = peg$
|
|
1496
|
+
s1 = peg$c55();
|
|
784
1497
|
s0 = s1;
|
|
785
1498
|
}
|
|
786
1499
|
else {
|
|
@@ -804,14 +1517,14 @@ function peg$parse(input, options) {
|
|
|
804
1517
|
s0 = peg$currPos;
|
|
805
1518
|
s1 = peg$parsesol();
|
|
806
1519
|
if (s1 !== peg$FAILED) {
|
|
807
|
-
if (input.substr(peg$currPos, 6) === peg$
|
|
808
|
-
s2 = peg$
|
|
1520
|
+
if (input.substr(peg$currPos, 6) === peg$c56) {
|
|
1521
|
+
s2 = peg$c56;
|
|
809
1522
|
peg$currPos += 6;
|
|
810
1523
|
}
|
|
811
1524
|
else {
|
|
812
1525
|
s2 = peg$FAILED;
|
|
813
1526
|
if (peg$silentFails === 0) {
|
|
814
|
-
peg$fail(peg$
|
|
1527
|
+
peg$fail(peg$c57);
|
|
815
1528
|
}
|
|
816
1529
|
}
|
|
817
1530
|
if (s2 !== peg$FAILED) {
|
|
@@ -820,7 +1533,7 @@ function peg$parse(input, options) {
|
|
|
820
1533
|
s4 = peg$parseidentifier();
|
|
821
1534
|
if (s4 !== peg$FAILED) {
|
|
822
1535
|
peg$savedPos = s0;
|
|
823
|
-
s1 = peg$
|
|
1536
|
+
s1 = peg$c58(s4);
|
|
824
1537
|
s0 = s1;
|
|
825
1538
|
}
|
|
826
1539
|
else {
|
|
@@ -849,14 +1562,14 @@ function peg$parse(input, options) {
|
|
|
849
1562
|
s0 = peg$currPos;
|
|
850
1563
|
s1 = peg$parsesol();
|
|
851
1564
|
if (s1 !== peg$FAILED) {
|
|
852
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
853
|
-
s2 = peg$
|
|
1565
|
+
if (input.substr(peg$currPos, 4) === peg$c59) {
|
|
1566
|
+
s2 = peg$c59;
|
|
854
1567
|
peg$currPos += 4;
|
|
855
1568
|
}
|
|
856
1569
|
else {
|
|
857
1570
|
s2 = peg$FAILED;
|
|
858
1571
|
if (peg$silentFails === 0) {
|
|
859
|
-
peg$fail(peg$
|
|
1572
|
+
peg$fail(peg$c60);
|
|
860
1573
|
}
|
|
861
1574
|
}
|
|
862
1575
|
if (s2 !== peg$FAILED) {
|
|
@@ -865,7 +1578,7 @@ function peg$parse(input, options) {
|
|
|
865
1578
|
s4 = peg$parseidentifier();
|
|
866
1579
|
if (s4 !== peg$FAILED) {
|
|
867
1580
|
peg$savedPos = s0;
|
|
868
|
-
s1 = peg$
|
|
1581
|
+
s1 = peg$c61(s4);
|
|
869
1582
|
s0 = s1;
|
|
870
1583
|
}
|
|
871
1584
|
else {
|
|
@@ -894,14 +1607,14 @@ function peg$parse(input, options) {
|
|
|
894
1607
|
s0 = peg$currPos;
|
|
895
1608
|
s1 = peg$parsesol();
|
|
896
1609
|
if (s1 !== peg$FAILED) {
|
|
897
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
898
|
-
s2 = peg$
|
|
1610
|
+
if (input.substr(peg$currPos, 4) === peg$c62) {
|
|
1611
|
+
s2 = peg$c62;
|
|
899
1612
|
peg$currPos += 4;
|
|
900
1613
|
}
|
|
901
1614
|
else {
|
|
902
1615
|
s2 = peg$FAILED;
|
|
903
1616
|
if (peg$silentFails === 0) {
|
|
904
|
-
peg$fail(peg$
|
|
1617
|
+
peg$fail(peg$c63);
|
|
905
1618
|
}
|
|
906
1619
|
}
|
|
907
1620
|
if (s2 !== peg$FAILED) {
|
|
@@ -910,7 +1623,7 @@ function peg$parse(input, options) {
|
|
|
910
1623
|
s4 = peg$parseidentifier();
|
|
911
1624
|
if (s4 !== peg$FAILED) {
|
|
912
1625
|
peg$savedPos = s0;
|
|
913
|
-
s1 = peg$
|
|
1626
|
+
s1 = peg$c64();
|
|
914
1627
|
s0 = s1;
|
|
915
1628
|
}
|
|
916
1629
|
else {
|
|
@@ -953,13 +1666,13 @@ function peg$parse(input, options) {
|
|
|
953
1666
|
}
|
|
954
1667
|
if (s3 !== peg$FAILED) {
|
|
955
1668
|
if (input.charCodeAt(peg$currPos) === 33) {
|
|
956
|
-
s4 = peg$
|
|
1669
|
+
s4 = peg$c65;
|
|
957
1670
|
peg$currPos++;
|
|
958
1671
|
}
|
|
959
1672
|
else {
|
|
960
1673
|
s4 = peg$FAILED;
|
|
961
1674
|
if (peg$silentFails === 0) {
|
|
962
|
-
peg$fail(peg$
|
|
1675
|
+
peg$fail(peg$c66);
|
|
963
1676
|
}
|
|
964
1677
|
}
|
|
965
1678
|
if (s4 === peg$FAILED) {
|
|
@@ -971,7 +1684,7 @@ function peg$parse(input, options) {
|
|
|
971
1684
|
s6 = peg$parsevalue_delim();
|
|
972
1685
|
if (s6 !== peg$FAILED) {
|
|
973
1686
|
peg$savedPos = s0;
|
|
974
|
-
s1 = peg$
|
|
1687
|
+
s1 = peg$c67(s5);
|
|
975
1688
|
s0 = s1;
|
|
976
1689
|
}
|
|
977
1690
|
else {
|
|
@@ -1019,68 +1732,68 @@ function peg$parse(input, options) {
|
|
|
1019
1732
|
}
|
|
1020
1733
|
if (s0 === peg$FAILED) {
|
|
1021
1734
|
if (input.charCodeAt(peg$currPos) === 40) {
|
|
1022
|
-
s0 = peg$
|
|
1735
|
+
s0 = peg$c68;
|
|
1023
1736
|
peg$currPos++;
|
|
1024
1737
|
}
|
|
1025
1738
|
else {
|
|
1026
1739
|
s0 = peg$FAILED;
|
|
1027
1740
|
if (peg$silentFails === 0) {
|
|
1028
|
-
peg$fail(peg$
|
|
1741
|
+
peg$fail(peg$c69);
|
|
1029
1742
|
}
|
|
1030
1743
|
}
|
|
1031
1744
|
if (s0 === peg$FAILED) {
|
|
1032
1745
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
1033
|
-
s0 = peg$
|
|
1746
|
+
s0 = peg$c70;
|
|
1034
1747
|
peg$currPos++;
|
|
1035
1748
|
}
|
|
1036
1749
|
else {
|
|
1037
1750
|
s0 = peg$FAILED;
|
|
1038
1751
|
if (peg$silentFails === 0) {
|
|
1039
|
-
peg$fail(peg$
|
|
1752
|
+
peg$fail(peg$c71);
|
|
1040
1753
|
}
|
|
1041
1754
|
}
|
|
1042
1755
|
if (s0 === peg$FAILED) {
|
|
1043
1756
|
if (input.charCodeAt(peg$currPos) === 91) {
|
|
1044
|
-
s0 = peg$
|
|
1757
|
+
s0 = peg$c72;
|
|
1045
1758
|
peg$currPos++;
|
|
1046
1759
|
}
|
|
1047
1760
|
else {
|
|
1048
1761
|
s0 = peg$FAILED;
|
|
1049
1762
|
if (peg$silentFails === 0) {
|
|
1050
|
-
peg$fail(peg$
|
|
1763
|
+
peg$fail(peg$c73);
|
|
1051
1764
|
}
|
|
1052
1765
|
}
|
|
1053
1766
|
if (s0 === peg$FAILED) {
|
|
1054
1767
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
1055
|
-
s0 = peg$
|
|
1768
|
+
s0 = peg$c20;
|
|
1056
1769
|
peg$currPos++;
|
|
1057
1770
|
}
|
|
1058
1771
|
else {
|
|
1059
1772
|
s0 = peg$FAILED;
|
|
1060
1773
|
if (peg$silentFails === 0) {
|
|
1061
|
-
peg$fail(peg$
|
|
1774
|
+
peg$fail(peg$c21);
|
|
1062
1775
|
}
|
|
1063
1776
|
}
|
|
1064
1777
|
if (s0 === peg$FAILED) {
|
|
1065
1778
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
1066
|
-
s0 = peg$
|
|
1779
|
+
s0 = peg$c24;
|
|
1067
1780
|
peg$currPos++;
|
|
1068
1781
|
}
|
|
1069
1782
|
else {
|
|
1070
1783
|
s0 = peg$FAILED;
|
|
1071
1784
|
if (peg$silentFails === 0) {
|
|
1072
|
-
peg$fail(peg$
|
|
1785
|
+
peg$fail(peg$c25);
|
|
1073
1786
|
}
|
|
1074
1787
|
}
|
|
1075
1788
|
if (s0 === peg$FAILED) {
|
|
1076
1789
|
if (input.charCodeAt(peg$currPos) === 65378) {
|
|
1077
|
-
s0 = peg$
|
|
1790
|
+
s0 = peg$c49;
|
|
1078
1791
|
peg$currPos++;
|
|
1079
1792
|
}
|
|
1080
1793
|
else {
|
|
1081
1794
|
s0 = peg$FAILED;
|
|
1082
1795
|
if (peg$silentFails === 0) {
|
|
1083
|
-
peg$fail(peg$
|
|
1796
|
+
peg$fail(peg$c50);
|
|
1084
1797
|
}
|
|
1085
1798
|
}
|
|
1086
1799
|
}
|
|
@@ -1097,38 +1810,38 @@ function peg$parse(input, options) {
|
|
|
1097
1810
|
s1 = peg$parsesol();
|
|
1098
1811
|
if (s1 !== peg$FAILED) {
|
|
1099
1812
|
if (input.charCodeAt(peg$currPos) === 61) {
|
|
1100
|
-
s2 = peg$
|
|
1813
|
+
s2 = peg$c74;
|
|
1101
1814
|
peg$currPos++;
|
|
1102
1815
|
}
|
|
1103
1816
|
else {
|
|
1104
1817
|
s2 = peg$FAILED;
|
|
1105
1818
|
if (peg$silentFails === 0) {
|
|
1106
|
-
peg$fail(peg$
|
|
1819
|
+
peg$fail(peg$c75);
|
|
1107
1820
|
}
|
|
1108
1821
|
}
|
|
1109
1822
|
if (s2 !== peg$FAILED) {
|
|
1110
1823
|
s3 = [];
|
|
1111
|
-
if (peg$
|
|
1824
|
+
if (peg$c76.test(input.charAt(peg$currPos))) {
|
|
1112
1825
|
s4 = input.charAt(peg$currPos);
|
|
1113
1826
|
peg$currPos++;
|
|
1114
1827
|
}
|
|
1115
1828
|
else {
|
|
1116
1829
|
s4 = peg$FAILED;
|
|
1117
1830
|
if (peg$silentFails === 0) {
|
|
1118
|
-
peg$fail(peg$
|
|
1831
|
+
peg$fail(peg$c77);
|
|
1119
1832
|
}
|
|
1120
1833
|
}
|
|
1121
1834
|
if (s4 !== peg$FAILED) {
|
|
1122
1835
|
while (s4 !== peg$FAILED) {
|
|
1123
1836
|
s3.push(s4);
|
|
1124
|
-
if (peg$
|
|
1837
|
+
if (peg$c76.test(input.charAt(peg$currPos))) {
|
|
1125
1838
|
s4 = input.charAt(peg$currPos);
|
|
1126
1839
|
peg$currPos++;
|
|
1127
1840
|
}
|
|
1128
1841
|
else {
|
|
1129
1842
|
s4 = peg$FAILED;
|
|
1130
1843
|
if (peg$silentFails === 0) {
|
|
1131
|
-
peg$fail(peg$
|
|
1844
|
+
peg$fail(peg$c77);
|
|
1132
1845
|
}
|
|
1133
1846
|
}
|
|
1134
1847
|
}
|
|
@@ -1138,7 +1851,7 @@ function peg$parse(input, options) {
|
|
|
1138
1851
|
}
|
|
1139
1852
|
if (s3 !== peg$FAILED) {
|
|
1140
1853
|
peg$savedPos = s0;
|
|
1141
|
-
s1 = peg$
|
|
1854
|
+
s1 = peg$c64();
|
|
1142
1855
|
s0 = s1;
|
|
1143
1856
|
}
|
|
1144
1857
|
else {
|
|
@@ -1163,43 +1876,43 @@ function peg$parse(input, options) {
|
|
|
1163
1876
|
s1 = peg$parsesol();
|
|
1164
1877
|
if (s1 !== peg$FAILED) {
|
|
1165
1878
|
s2 = [];
|
|
1166
|
-
if (peg$
|
|
1879
|
+
if (peg$c76.test(input.charAt(peg$currPos))) {
|
|
1167
1880
|
s3 = input.charAt(peg$currPos);
|
|
1168
1881
|
peg$currPos++;
|
|
1169
1882
|
}
|
|
1170
1883
|
else {
|
|
1171
1884
|
s3 = peg$FAILED;
|
|
1172
1885
|
if (peg$silentFails === 0) {
|
|
1173
|
-
peg$fail(peg$
|
|
1886
|
+
peg$fail(peg$c77);
|
|
1174
1887
|
}
|
|
1175
1888
|
}
|
|
1176
1889
|
while (s3 !== peg$FAILED) {
|
|
1177
1890
|
s2.push(s3);
|
|
1178
|
-
if (peg$
|
|
1891
|
+
if (peg$c76.test(input.charAt(peg$currPos))) {
|
|
1179
1892
|
s3 = input.charAt(peg$currPos);
|
|
1180
1893
|
peg$currPos++;
|
|
1181
1894
|
}
|
|
1182
1895
|
else {
|
|
1183
1896
|
s3 = peg$FAILED;
|
|
1184
1897
|
if (peg$silentFails === 0) {
|
|
1185
|
-
peg$fail(peg$
|
|
1898
|
+
peg$fail(peg$c77);
|
|
1186
1899
|
}
|
|
1187
1900
|
}
|
|
1188
1901
|
}
|
|
1189
1902
|
if (s2 !== peg$FAILED) {
|
|
1190
1903
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
1191
|
-
s3 = peg$
|
|
1904
|
+
s3 = peg$c78;
|
|
1192
1905
|
peg$currPos++;
|
|
1193
1906
|
}
|
|
1194
1907
|
else {
|
|
1195
1908
|
s3 = peg$FAILED;
|
|
1196
1909
|
if (peg$silentFails === 0) {
|
|
1197
|
-
peg$fail(peg$
|
|
1910
|
+
peg$fail(peg$c79);
|
|
1198
1911
|
}
|
|
1199
1912
|
}
|
|
1200
1913
|
if (s3 !== peg$FAILED) {
|
|
1201
1914
|
peg$savedPos = s0;
|
|
1202
|
-
s1 = peg$
|
|
1915
|
+
s1 = peg$c80();
|
|
1203
1916
|
s0 = s1;
|
|
1204
1917
|
}
|
|
1205
1918
|
else {
|
|
@@ -1235,7 +1948,7 @@ function peg$parse(input, options) {
|
|
|
1235
1948
|
}
|
|
1236
1949
|
if (s2 !== peg$FAILED) {
|
|
1237
1950
|
peg$savedPos = s0;
|
|
1238
|
-
s1 = peg$
|
|
1951
|
+
s1 = peg$c80();
|
|
1239
1952
|
s0 = s1;
|
|
1240
1953
|
}
|
|
1241
1954
|
else {
|
|
@@ -1254,38 +1967,38 @@ function peg$parse(input, options) {
|
|
|
1254
1967
|
peg$silentFails++;
|
|
1255
1968
|
s0 = peg$currPos;
|
|
1256
1969
|
s1 = peg$currPos;
|
|
1257
|
-
if (peg$
|
|
1970
|
+
if (peg$c82.test(input.charAt(peg$currPos))) {
|
|
1258
1971
|
s2 = input.charAt(peg$currPos);
|
|
1259
1972
|
peg$currPos++;
|
|
1260
1973
|
}
|
|
1261
1974
|
else {
|
|
1262
1975
|
s2 = peg$FAILED;
|
|
1263
1976
|
if (peg$silentFails === 0) {
|
|
1264
|
-
peg$fail(peg$
|
|
1977
|
+
peg$fail(peg$c83);
|
|
1265
1978
|
}
|
|
1266
1979
|
}
|
|
1267
1980
|
if (s2 !== peg$FAILED) {
|
|
1268
1981
|
s3 = [];
|
|
1269
|
-
if (peg$
|
|
1982
|
+
if (peg$c84.test(input.charAt(peg$currPos))) {
|
|
1270
1983
|
s4 = input.charAt(peg$currPos);
|
|
1271
1984
|
peg$currPos++;
|
|
1272
1985
|
}
|
|
1273
1986
|
else {
|
|
1274
1987
|
s4 = peg$FAILED;
|
|
1275
1988
|
if (peg$silentFails === 0) {
|
|
1276
|
-
peg$fail(peg$
|
|
1989
|
+
peg$fail(peg$c85);
|
|
1277
1990
|
}
|
|
1278
1991
|
}
|
|
1279
1992
|
while (s4 !== peg$FAILED) {
|
|
1280
1993
|
s3.push(s4);
|
|
1281
|
-
if (peg$
|
|
1994
|
+
if (peg$c84.test(input.charAt(peg$currPos))) {
|
|
1282
1995
|
s4 = input.charAt(peg$currPos);
|
|
1283
1996
|
peg$currPos++;
|
|
1284
1997
|
}
|
|
1285
1998
|
else {
|
|
1286
1999
|
s4 = peg$FAILED;
|
|
1287
2000
|
if (peg$silentFails === 0) {
|
|
1288
|
-
peg$fail(peg$
|
|
2001
|
+
peg$fail(peg$c85);
|
|
1289
2002
|
}
|
|
1290
2003
|
}
|
|
1291
2004
|
}
|
|
@@ -1312,7 +2025,7 @@ function peg$parse(input, options) {
|
|
|
1312
2025
|
if (s0 === peg$FAILED) {
|
|
1313
2026
|
s1 = peg$FAILED;
|
|
1314
2027
|
if (peg$silentFails === 0) {
|
|
1315
|
-
peg$fail(peg$
|
|
2028
|
+
peg$fail(peg$c81);
|
|
1316
2029
|
}
|
|
1317
2030
|
}
|
|
1318
2031
|
return s0;
|
|
@@ -1321,7 +2034,7 @@ function peg$parse(input, options) {
|
|
|
1321
2034
|
var s0, s1;
|
|
1322
2035
|
peg$silentFails++;
|
|
1323
2036
|
peg$savedPos = peg$currPos;
|
|
1324
|
-
s0 = peg$
|
|
2037
|
+
s0 = peg$c87();
|
|
1325
2038
|
if (s0) {
|
|
1326
2039
|
s0 = void 0;
|
|
1327
2040
|
}
|
|
@@ -1332,7 +2045,7 @@ function peg$parse(input, options) {
|
|
|
1332
2045
|
if (s0 === peg$FAILED) {
|
|
1333
2046
|
s1 = peg$FAILED;
|
|
1334
2047
|
if (peg$silentFails === 0) {
|
|
1335
|
-
peg$fail(peg$
|
|
2048
|
+
peg$fail(peg$c86);
|
|
1336
2049
|
}
|
|
1337
2050
|
}
|
|
1338
2051
|
return s0;
|
|
@@ -1341,27 +2054,27 @@ function peg$parse(input, options) {
|
|
|
1341
2054
|
var s0, s1;
|
|
1342
2055
|
peg$silentFails++;
|
|
1343
2056
|
s0 = [];
|
|
1344
|
-
if (peg$
|
|
2057
|
+
if (peg$c76.test(input.charAt(peg$currPos))) {
|
|
1345
2058
|
s1 = input.charAt(peg$currPos);
|
|
1346
2059
|
peg$currPos++;
|
|
1347
2060
|
}
|
|
1348
2061
|
else {
|
|
1349
2062
|
s1 = peg$FAILED;
|
|
1350
2063
|
if (peg$silentFails === 0) {
|
|
1351
|
-
peg$fail(peg$
|
|
2064
|
+
peg$fail(peg$c77);
|
|
1352
2065
|
}
|
|
1353
2066
|
}
|
|
1354
2067
|
if (s1 !== peg$FAILED) {
|
|
1355
2068
|
while (s1 !== peg$FAILED) {
|
|
1356
2069
|
s0.push(s1);
|
|
1357
|
-
if (peg$
|
|
2070
|
+
if (peg$c76.test(input.charAt(peg$currPos))) {
|
|
1358
2071
|
s1 = input.charAt(peg$currPos);
|
|
1359
2072
|
peg$currPos++;
|
|
1360
2073
|
}
|
|
1361
2074
|
else {
|
|
1362
2075
|
s1 = peg$FAILED;
|
|
1363
2076
|
if (peg$silentFails === 0) {
|
|
1364
|
-
peg$fail(peg$
|
|
2077
|
+
peg$fail(peg$c77);
|
|
1365
2078
|
}
|
|
1366
2079
|
}
|
|
1367
2080
|
}
|
|
@@ -1373,7 +2086,7 @@ function peg$parse(input, options) {
|
|
|
1373
2086
|
if (s0 === peg$FAILED) {
|
|
1374
2087
|
s1 = peg$FAILED;
|
|
1375
2088
|
if (peg$silentFails === 0) {
|
|
1376
|
-
peg$fail(peg$
|
|
2089
|
+
peg$fail(peg$c88);
|
|
1377
2090
|
}
|
|
1378
2091
|
}
|
|
1379
2092
|
return s0;
|
|
@@ -1386,6 +2099,26 @@ function peg$parse(input, options) {
|
|
|
1386
2099
|
options.isVerbatim = options.isVerbatim || (name => options.verbatimBlocks.indexOf(name) !== -1);
|
|
1387
2100
|
if (typeof options._inDirective !== 'boolean')
|
|
1388
2101
|
options._inDirective = false;
|
|
2102
|
+
// an option inside a hash follows its opening brace or a comma, across a continuation marker
|
|
2103
|
+
options.inHash =
|
|
2104
|
+
options.inHash ||
|
|
2105
|
+
(offset => {
|
|
2106
|
+
let at = offset - 1;
|
|
2107
|
+
for (;;) {
|
|
2108
|
+
while (at >= 0 && /[ \t\f\r]/.test(input.charAt(at)))
|
|
2109
|
+
at--;
|
|
2110
|
+
if (at > 0 && input.charAt(at) === '=' && input.charAt(at - 1) === '\n')
|
|
2111
|
+
at -= 2;
|
|
2112
|
+
else
|
|
2113
|
+
break;
|
|
2114
|
+
}
|
|
2115
|
+
return input.charAt(at) === '\x7b' || input.charAt(at) === ',';
|
|
2116
|
+
});
|
|
2117
|
+
// a `>` left on the line closed the value early, unless the options or the hash go on
|
|
2118
|
+
options.closedEarly =
|
|
2119
|
+
options.closedEarly ||
|
|
2120
|
+
((rest, inHash) => rest.indexOf('>') !== -1 && !(inHash ? /^[ \t\f]*[:,\x7d]/ : /^[ \t\f]*:/).test(rest));
|
|
2121
|
+
options.nestedAngleAdvice = 'use a non-conflicting delimiter ("...", (...), <<...>>) or plain text';
|
|
1389
2122
|
peg$result = peg$startRuleFunction();
|
|
1390
2123
|
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
|
|
1391
2124
|
return peg$result;
|