@formique/semantq 1.1.4 → 1.1.6
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/LowCodeParser.js +609 -411
- package/astToFormique.js +233 -304
- package/formique-semantq.js +4 -4
- package/package.json +1 -1
package/LowCodeParser.js
CHANGED
|
@@ -166,43 +166,45 @@ function peg$parse(input, options) {
|
|
|
166
166
|
|
|
167
167
|
const peg$c0 = "@form:";
|
|
168
168
|
const peg$c1 = ":";
|
|
169
|
-
const peg$c2 = "
|
|
170
|
-
const peg$c3 = "
|
|
171
|
-
const peg$c4 = "
|
|
172
|
-
const peg$c5 = "
|
|
169
|
+
const peg$c2 = "\"";
|
|
170
|
+
const peg$c3 = "true";
|
|
171
|
+
const peg$c4 = "false";
|
|
172
|
+
const peg$c5 = "-";
|
|
173
173
|
const peg$c6 = ",";
|
|
174
174
|
|
|
175
|
-
const peg$r0 = /^[
|
|
176
|
-
const peg$r1 = /^[
|
|
177
|
-
const peg$r2 = /^[
|
|
178
|
-
const peg$r3 = /^[
|
|
179
|
-
const peg$r4 = /^[
|
|
180
|
-
const peg$r5 = /^[
|
|
181
|
-
const peg$r6 = /^[
|
|
182
|
-
const peg$r7 = /^[
|
|
183
|
-
const peg$r8 = /^[
|
|
184
|
-
const peg$r9 = /^[a-zA-
|
|
185
|
-
const peg$r10 = /^[
|
|
175
|
+
const peg$r0 = /^[^"]/;
|
|
176
|
+
const peg$r1 = /^[0-9]/;
|
|
177
|
+
const peg$r2 = /^[a-zA-Z0-9_\-*!]/;
|
|
178
|
+
const peg$r3 = /^[a-zA-Z0-9_\-]/;
|
|
179
|
+
const peg$r4 = /^[!*]/;
|
|
180
|
+
const peg$r5 = /^[\r\n]/;
|
|
181
|
+
const peg$r6 = /^[^,\r\n]/;
|
|
182
|
+
const peg$r7 = /^[^\r\n]/;
|
|
183
|
+
const peg$r8 = /^[a-zA-Z]/;
|
|
184
|
+
const peg$r9 = /^[a-zA-Z0-9_ \-]/;
|
|
185
|
+
const peg$r10 = /^[ \t\n\r]/;
|
|
186
|
+
const peg$r11 = /^[a-zA-Z_]/;
|
|
186
187
|
|
|
187
188
|
const peg$e0 = peg$otherExpectation("form directive must be in this format: @form: form-name");
|
|
188
189
|
const peg$e1 = peg$literalExpectation("@form:", false);
|
|
189
190
|
const peg$e2 = peg$literalExpectation(":", false);
|
|
190
|
-
const peg$e3 = peg$
|
|
191
|
-
const peg$e4 = peg$
|
|
192
|
-
const peg$e5 = peg$
|
|
193
|
-
const peg$e6 = peg$literalExpectation("
|
|
194
|
-
const peg$e7 = peg$classExpectation(["
|
|
195
|
-
const peg$e8 = peg$literalExpectation("
|
|
196
|
-
const peg$e9 = peg$
|
|
197
|
-
const peg$e10 = peg$classExpectation([["0", "9"]], false, false, false);
|
|
198
|
-
const peg$e11 = peg$classExpectation([
|
|
199
|
-
const peg$e12 = peg$
|
|
200
|
-
const peg$e13 = peg$
|
|
201
|
-
const peg$e14 = peg$classExpectation([
|
|
202
|
-
const peg$e15 = peg$classExpectation([
|
|
203
|
-
const peg$e16 = peg$classExpectation(["
|
|
204
|
-
const peg$e17 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false, false);
|
|
205
|
-
const peg$e18 = peg$classExpectation([
|
|
191
|
+
const peg$e3 = peg$literalExpectation("\"", false);
|
|
192
|
+
const peg$e4 = peg$classExpectation(["\""], true, false, false);
|
|
193
|
+
const peg$e5 = peg$literalExpectation("true", false);
|
|
194
|
+
const peg$e6 = peg$literalExpectation("false", false);
|
|
195
|
+
const peg$e7 = peg$classExpectation([["0", "9"]], false, false, false);
|
|
196
|
+
const peg$e8 = peg$literalExpectation("-", false);
|
|
197
|
+
const peg$e9 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-", "*", "!"], false, false, false);
|
|
198
|
+
const peg$e10 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false, false);
|
|
199
|
+
const peg$e11 = peg$classExpectation(["!", "*"], false, false, false);
|
|
200
|
+
const peg$e12 = peg$literalExpectation(",", false);
|
|
201
|
+
const peg$e13 = peg$classExpectation(["\r", "\n"], false, false, false);
|
|
202
|
+
const peg$e14 = peg$classExpectation([",", "\r", "\n"], true, false, false);
|
|
203
|
+
const peg$e15 = peg$classExpectation(["\r", "\n"], true, false, false);
|
|
204
|
+
const peg$e16 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false, false);
|
|
205
|
+
const peg$e17 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", " ", "-"], false, false, false);
|
|
206
|
+
const peg$e18 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false, false);
|
|
207
|
+
const peg$e19 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false, false);
|
|
206
208
|
|
|
207
209
|
function peg$f0(definition) {
|
|
208
210
|
// definition is already a filtered array from the rule below.
|
|
@@ -247,86 +249,112 @@ return createNode('FormDirective', location().start, location().end, {
|
|
|
247
249
|
value: contents.join("").replace(/\s+/g, ' ').trim() // Normalizes multiline spaces
|
|
248
250
|
})
|
|
249
251
|
}
|
|
250
|
-
function peg$f6(
|
|
251
|
-
function peg$f7() { return " " }
|
|
252
|
-
function peg$f8() {
|
|
252
|
+
function peg$f6() {
|
|
253
253
|
return createNode('StringLiteral', location().start, location().end, {
|
|
254
254
|
value: text().slice(1, -1)
|
|
255
255
|
})
|
|
256
256
|
}
|
|
257
|
-
function peg$
|
|
257
|
+
function peg$f7() {
|
|
258
258
|
return createNode('BooleanLiteral', location().start, location().end, {
|
|
259
259
|
value: text() === "true"
|
|
260
260
|
})
|
|
261
261
|
}
|
|
262
|
-
function peg$
|
|
262
|
+
function peg$f8() {
|
|
263
263
|
return createNode('NumberLiteral', location().start, location().end, {
|
|
264
264
|
value: parseInt(text(), 10)
|
|
265
265
|
})
|
|
266
266
|
}
|
|
267
|
-
function peg$
|
|
267
|
+
function peg$f9(fields) {
|
|
268
268
|
return createNode('FormFields', location().start, location().end, {
|
|
269
269
|
fields: fields
|
|
270
270
|
})
|
|
271
271
|
}
|
|
272
|
-
function peg$
|
|
272
|
+
function peg$f10(name, attributes) {
|
|
273
|
+
const attrs = attributes || [];
|
|
274
|
+
const optionsAttr = attrs.find(a => a.key === 'options');
|
|
275
|
+
|
|
276
|
+
let fieldType = "standard";
|
|
277
|
+
let primaryValues = [];
|
|
278
|
+
|
|
279
|
+
if (optionsAttr) {
|
|
280
|
+
// Handle both OptionsAttribute (array) and FieldAttribute (string fallback)
|
|
281
|
+
primaryValues = Array.isArray(optionsAttr.values)
|
|
282
|
+
? optionsAttr.values.map(v => v.value)
|
|
283
|
+
: optionsAttr.value.value.split(',').map(v => v.trim());
|
|
284
|
+
|
|
285
|
+
// 💡 THE CULPRIT: Check if any OTHER attribute key is one of our options
|
|
286
|
+
const hasCascadingRules = attrs.some(a =>
|
|
287
|
+
a.key !== 'options' && primaryValues.includes(a.key)
|
|
288
|
+
);
|
|
289
|
+
|
|
290
|
+
if (hasCascadingRules) {
|
|
291
|
+
fieldType = "dynamicSingleSelect";
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
273
295
|
return createNode('FormField', location().start, location().end, {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
296
|
+
name: name,
|
|
297
|
+
fieldType: fieldType,
|
|
298
|
+
attributes: attrs
|
|
299
|
+
});
|
|
277
300
|
}
|
|
278
|
-
function peg$
|
|
301
|
+
function peg$f11(markers, name, markers2) {
|
|
279
302
|
return (markers || '') + name + (markers2 || '')
|
|
280
303
|
}
|
|
281
|
-
function peg$
|
|
304
|
+
function peg$f12(name, namePart, type) {
|
|
282
305
|
return (name || '') + namePart.join('') + ':' + type.join('')
|
|
283
306
|
}
|
|
284
|
-
function peg$
|
|
285
|
-
function peg$
|
|
286
|
-
function peg$
|
|
307
|
+
function peg$f13() { return text() }
|
|
308
|
+
function peg$f14() { return text() }
|
|
309
|
+
function peg$f15(attrs) {
|
|
287
310
|
return attrs.map(attr => attr[1])
|
|
288
311
|
}
|
|
289
|
-
function peg$
|
|
312
|
+
function peg$f16() { return Array.isArray(arguments[0]) ? false : text().startsWith("options:") }
|
|
313
|
+
function peg$f17(key, value) { // Consumes trailing spaces/newlines
|
|
290
314
|
return createNode('FieldAttribute', location().start, location().end, {
|
|
291
315
|
key: key, // 💡 FIX: Removed .value, since AttributeKey returns a string
|
|
292
316
|
value: value
|
|
293
317
|
})
|
|
294
318
|
}
|
|
295
|
-
function peg$
|
|
319
|
+
function peg$f18(flag) {
|
|
296
320
|
return createNode('FieldAttribute', location().start, location().end, {
|
|
297
321
|
key: flag,
|
|
298
322
|
value: createNode('BooleanLiteral', location().start, location().end, { value: true })
|
|
299
323
|
})
|
|
300
324
|
}
|
|
301
|
-
function peg$
|
|
325
|
+
function peg$f19(key, values) {
|
|
302
326
|
return createNode('OptionsAttribute', location().start, location().end, {
|
|
303
327
|
key: key, // 💡 FIX: Removed .value, since AttributeKey returns a string
|
|
304
328
|
values: values
|
|
305
329
|
})
|
|
306
330
|
}
|
|
307
|
-
function peg$
|
|
308
|
-
const options = [head];
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
331
|
+
function peg$f20(head, tail) {
|
|
332
|
+
const options = [head];
|
|
333
|
+
for (const item of tail) {
|
|
334
|
+
options.push(item[3]);
|
|
335
|
+
}
|
|
336
|
+
return options;
|
|
337
|
+
}
|
|
338
|
+
function peg$f21(option) {
|
|
339
|
+
return [option];
|
|
314
340
|
}
|
|
315
341
|
function peg$f22(value) {
|
|
316
342
|
return createNode('Option', location().start, location().end, {
|
|
317
|
-
value: value.value,
|
|
318
|
-
quoted: value.type === 'StringLiteral'
|
|
343
|
+
value: value.value,
|
|
344
|
+
quoted: value.type === 'StringLiteral'
|
|
319
345
|
})
|
|
320
346
|
}
|
|
321
|
-
function peg$f23() {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
347
|
+
function peg$f23(contents) {
|
|
348
|
+
return createNode('StringLiteral', location().start, location().end, {
|
|
349
|
+
value: contents.map(c => c[1]).join("").trim()
|
|
350
|
+
})
|
|
325
351
|
}
|
|
326
|
-
function peg$
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
352
|
+
function peg$f24(char) { return char }
|
|
353
|
+
function peg$f25() { return " " }
|
|
354
|
+
function peg$f26() { return text() }
|
|
355
|
+
function peg$f27() { return text() }
|
|
356
|
+
function peg$f28() {
|
|
357
|
+
return createNode('Identifier', location().start, location().end, { value: text() })
|
|
330
358
|
}
|
|
331
359
|
let peg$currPos = options.peg$currPos | 0;
|
|
332
360
|
let peg$savedPos = peg$currPos;
|
|
@@ -686,233 +714,46 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
686
714
|
return s0;
|
|
687
715
|
}
|
|
688
716
|
|
|
689
|
-
function peg$parseUnquotedLine() {
|
|
690
|
-
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
691
|
-
|
|
692
|
-
s0 = peg$currPos;
|
|
693
|
-
s1 = peg$currPos;
|
|
694
|
-
peg$silentFails++;
|
|
695
|
-
s2 = peg$currPos;
|
|
696
|
-
s3 = [];
|
|
697
|
-
s4 = input.charAt(peg$currPos);
|
|
698
|
-
if (peg$r0.test(s4)) {
|
|
699
|
-
peg$currPos++;
|
|
700
|
-
} else {
|
|
701
|
-
s4 = peg$FAILED;
|
|
702
|
-
if (peg$silentFails === 0) { peg$fail(peg$e3); }
|
|
703
|
-
}
|
|
704
|
-
if (s4 !== peg$FAILED) {
|
|
705
|
-
while (s4 !== peg$FAILED) {
|
|
706
|
-
s3.push(s4);
|
|
707
|
-
s4 = input.charAt(peg$currPos);
|
|
708
|
-
if (peg$r0.test(s4)) {
|
|
709
|
-
peg$currPos++;
|
|
710
|
-
} else {
|
|
711
|
-
s4 = peg$FAILED;
|
|
712
|
-
if (peg$silentFails === 0) { peg$fail(peg$e3); }
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
} else {
|
|
716
|
-
s3 = peg$FAILED;
|
|
717
|
-
}
|
|
718
|
-
if (s3 !== peg$FAILED) {
|
|
719
|
-
s4 = peg$parse_();
|
|
720
|
-
if (input.charCodeAt(peg$currPos) === 45) {
|
|
721
|
-
s5 = peg$c2;
|
|
722
|
-
peg$currPos++;
|
|
723
|
-
} else {
|
|
724
|
-
s5 = peg$FAILED;
|
|
725
|
-
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
726
|
-
}
|
|
727
|
-
if (s5 === peg$FAILED) {
|
|
728
|
-
s5 = peg$currPos;
|
|
729
|
-
s6 = peg$parseIdentifier();
|
|
730
|
-
if (s6 !== peg$FAILED) {
|
|
731
|
-
if (input.charCodeAt(peg$currPos) === 58) {
|
|
732
|
-
s7 = peg$c1;
|
|
733
|
-
peg$currPos++;
|
|
734
|
-
} else {
|
|
735
|
-
s7 = peg$FAILED;
|
|
736
|
-
if (peg$silentFails === 0) { peg$fail(peg$e2); }
|
|
737
|
-
}
|
|
738
|
-
if (s7 !== peg$FAILED) {
|
|
739
|
-
s6 = [s6, s7];
|
|
740
|
-
s5 = s6;
|
|
741
|
-
} else {
|
|
742
|
-
peg$currPos = s5;
|
|
743
|
-
s5 = peg$FAILED;
|
|
744
|
-
}
|
|
745
|
-
} else {
|
|
746
|
-
peg$currPos = s5;
|
|
747
|
-
s5 = peg$FAILED;
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
if (s5 !== peg$FAILED) {
|
|
751
|
-
s3 = [s3, s4, s5];
|
|
752
|
-
s2 = s3;
|
|
753
|
-
} else {
|
|
754
|
-
peg$currPos = s2;
|
|
755
|
-
s2 = peg$FAILED;
|
|
756
|
-
}
|
|
757
|
-
} else {
|
|
758
|
-
peg$currPos = s2;
|
|
759
|
-
s2 = peg$FAILED;
|
|
760
|
-
}
|
|
761
|
-
peg$silentFails--;
|
|
762
|
-
if (s2 === peg$FAILED) {
|
|
763
|
-
s1 = undefined;
|
|
764
|
-
} else {
|
|
765
|
-
peg$currPos = s1;
|
|
766
|
-
s1 = peg$FAILED;
|
|
767
|
-
}
|
|
768
|
-
if (s1 !== peg$FAILED) {
|
|
769
|
-
s2 = input.charAt(peg$currPos);
|
|
770
|
-
if (peg$r1.test(s2)) {
|
|
771
|
-
peg$currPos++;
|
|
772
|
-
} else {
|
|
773
|
-
s2 = peg$FAILED;
|
|
774
|
-
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
775
|
-
}
|
|
776
|
-
if (s2 !== peg$FAILED) {
|
|
777
|
-
peg$savedPos = s0;
|
|
778
|
-
s0 = peg$f6(s2);
|
|
779
|
-
} else {
|
|
780
|
-
peg$currPos = s0;
|
|
781
|
-
s0 = peg$FAILED;
|
|
782
|
-
}
|
|
783
|
-
} else {
|
|
784
|
-
peg$currPos = s0;
|
|
785
|
-
s0 = peg$FAILED;
|
|
786
|
-
}
|
|
787
|
-
if (s0 === peg$FAILED) {
|
|
788
|
-
s0 = peg$currPos;
|
|
789
|
-
s1 = [];
|
|
790
|
-
s2 = input.charAt(peg$currPos);
|
|
791
|
-
if (peg$r0.test(s2)) {
|
|
792
|
-
peg$currPos++;
|
|
793
|
-
} else {
|
|
794
|
-
s2 = peg$FAILED;
|
|
795
|
-
if (peg$silentFails === 0) { peg$fail(peg$e3); }
|
|
796
|
-
}
|
|
797
|
-
if (s2 !== peg$FAILED) {
|
|
798
|
-
while (s2 !== peg$FAILED) {
|
|
799
|
-
s1.push(s2);
|
|
800
|
-
s2 = input.charAt(peg$currPos);
|
|
801
|
-
if (peg$r0.test(s2)) {
|
|
802
|
-
peg$currPos++;
|
|
803
|
-
} else {
|
|
804
|
-
s2 = peg$FAILED;
|
|
805
|
-
if (peg$silentFails === 0) { peg$fail(peg$e3); }
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
} else {
|
|
809
|
-
s1 = peg$FAILED;
|
|
810
|
-
}
|
|
811
|
-
if (s1 !== peg$FAILED) {
|
|
812
|
-
s2 = peg$currPos;
|
|
813
|
-
peg$silentFails++;
|
|
814
|
-
s3 = peg$currPos;
|
|
815
|
-
s4 = peg$parse_();
|
|
816
|
-
if (input.charCodeAt(peg$currPos) === 45) {
|
|
817
|
-
s5 = peg$c2;
|
|
818
|
-
peg$currPos++;
|
|
819
|
-
} else {
|
|
820
|
-
s5 = peg$FAILED;
|
|
821
|
-
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
822
|
-
}
|
|
823
|
-
if (s5 === peg$FAILED) {
|
|
824
|
-
s5 = peg$currPos;
|
|
825
|
-
s6 = peg$parseIdentifier();
|
|
826
|
-
if (s6 !== peg$FAILED) {
|
|
827
|
-
if (input.charCodeAt(peg$currPos) === 58) {
|
|
828
|
-
s7 = peg$c1;
|
|
829
|
-
peg$currPos++;
|
|
830
|
-
} else {
|
|
831
|
-
s7 = peg$FAILED;
|
|
832
|
-
if (peg$silentFails === 0) { peg$fail(peg$e2); }
|
|
833
|
-
}
|
|
834
|
-
if (s7 !== peg$FAILED) {
|
|
835
|
-
s6 = [s6, s7];
|
|
836
|
-
s5 = s6;
|
|
837
|
-
} else {
|
|
838
|
-
peg$currPos = s5;
|
|
839
|
-
s5 = peg$FAILED;
|
|
840
|
-
}
|
|
841
|
-
} else {
|
|
842
|
-
peg$currPos = s5;
|
|
843
|
-
s5 = peg$FAILED;
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
if (s5 !== peg$FAILED) {
|
|
847
|
-
s4 = [s4, s5];
|
|
848
|
-
s3 = s4;
|
|
849
|
-
} else {
|
|
850
|
-
peg$currPos = s3;
|
|
851
|
-
s3 = peg$FAILED;
|
|
852
|
-
}
|
|
853
|
-
peg$silentFails--;
|
|
854
|
-
if (s3 === peg$FAILED) {
|
|
855
|
-
s2 = undefined;
|
|
856
|
-
} else {
|
|
857
|
-
peg$currPos = s2;
|
|
858
|
-
s2 = peg$FAILED;
|
|
859
|
-
}
|
|
860
|
-
if (s2 !== peg$FAILED) {
|
|
861
|
-
peg$savedPos = s0;
|
|
862
|
-
s0 = peg$f7();
|
|
863
|
-
} else {
|
|
864
|
-
peg$currPos = s0;
|
|
865
|
-
s0 = peg$FAILED;
|
|
866
|
-
}
|
|
867
|
-
} else {
|
|
868
|
-
peg$currPos = s0;
|
|
869
|
-
s0 = peg$FAILED;
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
return s0;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
717
|
function peg$parseStringLiteral() {
|
|
877
718
|
let s0, s1, s2, s3;
|
|
878
719
|
|
|
879
720
|
s0 = peg$currPos;
|
|
880
721
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
881
|
-
s1 = peg$
|
|
722
|
+
s1 = peg$c2;
|
|
882
723
|
peg$currPos++;
|
|
883
724
|
} else {
|
|
884
725
|
s1 = peg$FAILED;
|
|
885
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
726
|
+
if (peg$silentFails === 0) { peg$fail(peg$e3); }
|
|
886
727
|
}
|
|
887
728
|
if (s1 !== peg$FAILED) {
|
|
888
729
|
s2 = [];
|
|
889
730
|
s3 = input.charAt(peg$currPos);
|
|
890
|
-
if (peg$
|
|
731
|
+
if (peg$r0.test(s3)) {
|
|
891
732
|
peg$currPos++;
|
|
892
733
|
} else {
|
|
893
734
|
s3 = peg$FAILED;
|
|
894
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
735
|
+
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
895
736
|
}
|
|
896
737
|
while (s3 !== peg$FAILED) {
|
|
897
738
|
s2.push(s3);
|
|
898
739
|
s3 = input.charAt(peg$currPos);
|
|
899
|
-
if (peg$
|
|
740
|
+
if (peg$r0.test(s3)) {
|
|
900
741
|
peg$currPos++;
|
|
901
742
|
} else {
|
|
902
743
|
s3 = peg$FAILED;
|
|
903
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
744
|
+
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
904
745
|
}
|
|
905
746
|
}
|
|
906
747
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
907
|
-
s3 = peg$
|
|
748
|
+
s3 = peg$c2;
|
|
908
749
|
peg$currPos++;
|
|
909
750
|
} else {
|
|
910
751
|
s3 = peg$FAILED;
|
|
911
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
752
|
+
if (peg$silentFails === 0) { peg$fail(peg$e3); }
|
|
912
753
|
}
|
|
913
754
|
if (s3 !== peg$FAILED) {
|
|
914
755
|
peg$savedPos = s0;
|
|
915
|
-
s0 = peg$
|
|
756
|
+
s0 = peg$f6();
|
|
916
757
|
} else {
|
|
917
758
|
peg$currPos = s0;
|
|
918
759
|
s0 = peg$FAILED;
|
|
@@ -929,25 +770,25 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
929
770
|
let s0, s1;
|
|
930
771
|
|
|
931
772
|
s0 = peg$currPos;
|
|
932
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
933
|
-
s1 = peg$
|
|
773
|
+
if (input.substr(peg$currPos, 4) === peg$c3) {
|
|
774
|
+
s1 = peg$c3;
|
|
934
775
|
peg$currPos += 4;
|
|
935
776
|
} else {
|
|
936
777
|
s1 = peg$FAILED;
|
|
937
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
778
|
+
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
938
779
|
}
|
|
939
780
|
if (s1 === peg$FAILED) {
|
|
940
|
-
if (input.substr(peg$currPos, 5) === peg$
|
|
941
|
-
s1 = peg$
|
|
781
|
+
if (input.substr(peg$currPos, 5) === peg$c4) {
|
|
782
|
+
s1 = peg$c4;
|
|
942
783
|
peg$currPos += 5;
|
|
943
784
|
} else {
|
|
944
785
|
s1 = peg$FAILED;
|
|
945
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
786
|
+
if (peg$silentFails === 0) { peg$fail(peg$e6); }
|
|
946
787
|
}
|
|
947
788
|
}
|
|
948
789
|
if (s1 !== peg$FAILED) {
|
|
949
790
|
peg$savedPos = s0;
|
|
950
|
-
s1 = peg$
|
|
791
|
+
s1 = peg$f7();
|
|
951
792
|
}
|
|
952
793
|
s0 = s1;
|
|
953
794
|
|
|
@@ -960,21 +801,21 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
960
801
|
s0 = peg$currPos;
|
|
961
802
|
s1 = [];
|
|
962
803
|
s2 = input.charAt(peg$currPos);
|
|
963
|
-
if (peg$
|
|
804
|
+
if (peg$r1.test(s2)) {
|
|
964
805
|
peg$currPos++;
|
|
965
806
|
} else {
|
|
966
807
|
s2 = peg$FAILED;
|
|
967
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
808
|
+
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
968
809
|
}
|
|
969
810
|
if (s2 !== peg$FAILED) {
|
|
970
811
|
while (s2 !== peg$FAILED) {
|
|
971
812
|
s1.push(s2);
|
|
972
813
|
s2 = input.charAt(peg$currPos);
|
|
973
|
-
if (peg$
|
|
814
|
+
if (peg$r1.test(s2)) {
|
|
974
815
|
peg$currPos++;
|
|
975
816
|
} else {
|
|
976
817
|
s2 = peg$FAILED;
|
|
977
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
818
|
+
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
978
819
|
}
|
|
979
820
|
}
|
|
980
821
|
} else {
|
|
@@ -982,7 +823,7 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
982
823
|
}
|
|
983
824
|
if (s1 !== peg$FAILED) {
|
|
984
825
|
peg$savedPos = s0;
|
|
985
|
-
s1 = peg$
|
|
826
|
+
s1 = peg$f8();
|
|
986
827
|
}
|
|
987
828
|
s0 = s1;
|
|
988
829
|
|
|
@@ -1006,7 +847,7 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1006
847
|
}
|
|
1007
848
|
if (s2 !== peg$FAILED) {
|
|
1008
849
|
peg$savedPos = s0;
|
|
1009
|
-
s0 = peg$
|
|
850
|
+
s0 = peg$f9(s2);
|
|
1010
851
|
} else {
|
|
1011
852
|
peg$currPos = s0;
|
|
1012
853
|
s0 = peg$FAILED;
|
|
@@ -1020,11 +861,11 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1020
861
|
|
|
1021
862
|
s0 = peg$currPos;
|
|
1022
863
|
if (input.charCodeAt(peg$currPos) === 45) {
|
|
1023
|
-
s1 = peg$
|
|
864
|
+
s1 = peg$c5;
|
|
1024
865
|
peg$currPos++;
|
|
1025
866
|
} else {
|
|
1026
867
|
s1 = peg$FAILED;
|
|
1027
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
868
|
+
if (peg$silentFails === 0) { peg$fail(peg$e8); }
|
|
1028
869
|
}
|
|
1029
870
|
if (s1 !== peg$FAILED) {
|
|
1030
871
|
s2 = peg$parse_();
|
|
@@ -1033,7 +874,7 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1033
874
|
s4 = peg$parseFieldAttributes();
|
|
1034
875
|
s5 = peg$parse_();
|
|
1035
876
|
peg$savedPos = s0;
|
|
1036
|
-
s0 = peg$
|
|
877
|
+
s0 = peg$f10(s3, s4);
|
|
1037
878
|
} else {
|
|
1038
879
|
peg$currPos = s0;
|
|
1039
880
|
s0 = peg$FAILED;
|
|
@@ -1065,7 +906,7 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1065
906
|
}
|
|
1066
907
|
s7 = peg$parse_();
|
|
1067
908
|
peg$savedPos = s0;
|
|
1068
|
-
s0 = peg$
|
|
909
|
+
s0 = peg$f11(s2, s4, s6);
|
|
1069
910
|
} else {
|
|
1070
911
|
peg$currPos = s0;
|
|
1071
912
|
s0 = peg$FAILED;
|
|
@@ -1095,56 +936,53 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1095
936
|
}
|
|
1096
937
|
s2 = [];
|
|
1097
938
|
s3 = input.charAt(peg$currPos);
|
|
1098
|
-
if (peg$
|
|
939
|
+
if (peg$r2.test(s3)) {
|
|
1099
940
|
peg$currPos++;
|
|
1100
941
|
} else {
|
|
1101
942
|
s3 = peg$FAILED;
|
|
1102
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
943
|
+
if (peg$silentFails === 0) { peg$fail(peg$e9); }
|
|
1103
944
|
}
|
|
1104
945
|
if (s3 !== peg$FAILED) {
|
|
1105
946
|
while (s3 !== peg$FAILED) {
|
|
1106
947
|
s2.push(s3);
|
|
1107
948
|
s3 = input.charAt(peg$currPos);
|
|
1108
|
-
if (peg$
|
|
949
|
+
if (peg$r2.test(s3)) {
|
|
1109
950
|
peg$currPos++;
|
|
1110
951
|
} else {
|
|
1111
952
|
s3 = peg$FAILED;
|
|
1112
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
953
|
+
if (peg$silentFails === 0) { peg$fail(peg$e9); }
|
|
1113
954
|
}
|
|
1114
955
|
}
|
|
1115
956
|
} else {
|
|
1116
957
|
s2 = peg$FAILED;
|
|
1117
958
|
}
|
|
1118
959
|
if (s2 !== peg$FAILED) {
|
|
1119
|
-
s3 = peg$parseFieldMarkers();
|
|
1120
|
-
if (s3 === peg$FAILED) {
|
|
1121
|
-
s3 = null;
|
|
1122
|
-
}
|
|
1123
960
|
if (input.charCodeAt(peg$currPos) === 58) {
|
|
1124
|
-
|
|
961
|
+
s3 = peg$c1;
|
|
1125
962
|
peg$currPos++;
|
|
1126
963
|
} else {
|
|
1127
|
-
|
|
964
|
+
s3 = peg$FAILED;
|
|
1128
965
|
if (peg$silentFails === 0) { peg$fail(peg$e2); }
|
|
1129
966
|
}
|
|
1130
|
-
if (
|
|
967
|
+
if (s3 !== peg$FAILED) {
|
|
968
|
+
s4 = peg$parse_();
|
|
1131
969
|
s5 = [];
|
|
1132
970
|
s6 = input.charAt(peg$currPos);
|
|
1133
|
-
if (peg$
|
|
971
|
+
if (peg$r3.test(s6)) {
|
|
1134
972
|
peg$currPos++;
|
|
1135
973
|
} else {
|
|
1136
974
|
s6 = peg$FAILED;
|
|
1137
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
975
|
+
if (peg$silentFails === 0) { peg$fail(peg$e10); }
|
|
1138
976
|
}
|
|
1139
977
|
if (s6 !== peg$FAILED) {
|
|
1140
978
|
while (s6 !== peg$FAILED) {
|
|
1141
979
|
s5.push(s6);
|
|
1142
980
|
s6 = input.charAt(peg$currPos);
|
|
1143
|
-
if (peg$
|
|
981
|
+
if (peg$r3.test(s6)) {
|
|
1144
982
|
peg$currPos++;
|
|
1145
983
|
} else {
|
|
1146
984
|
s6 = peg$FAILED;
|
|
1147
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
985
|
+
if (peg$silentFails === 0) { peg$fail(peg$e10); }
|
|
1148
986
|
}
|
|
1149
987
|
}
|
|
1150
988
|
} else {
|
|
@@ -1152,7 +990,7 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1152
990
|
}
|
|
1153
991
|
if (s5 !== peg$FAILED) {
|
|
1154
992
|
peg$savedPos = s0;
|
|
1155
|
-
s0 = peg$
|
|
993
|
+
s0 = peg$f12(s1, s2, s5);
|
|
1156
994
|
} else {
|
|
1157
995
|
peg$currPos = s0;
|
|
1158
996
|
s0 = peg$FAILED;
|
|
@@ -1175,21 +1013,21 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1175
1013
|
s0 = peg$currPos;
|
|
1176
1014
|
s1 = [];
|
|
1177
1015
|
s2 = input.charAt(peg$currPos);
|
|
1178
|
-
if (peg$
|
|
1016
|
+
if (peg$r3.test(s2)) {
|
|
1179
1017
|
peg$currPos++;
|
|
1180
1018
|
} else {
|
|
1181
1019
|
s2 = peg$FAILED;
|
|
1182
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1020
|
+
if (peg$silentFails === 0) { peg$fail(peg$e10); }
|
|
1183
1021
|
}
|
|
1184
1022
|
if (s2 !== peg$FAILED) {
|
|
1185
1023
|
while (s2 !== peg$FAILED) {
|
|
1186
1024
|
s1.push(s2);
|
|
1187
1025
|
s2 = input.charAt(peg$currPos);
|
|
1188
|
-
if (peg$
|
|
1026
|
+
if (peg$r3.test(s2)) {
|
|
1189
1027
|
peg$currPos++;
|
|
1190
1028
|
} else {
|
|
1191
1029
|
s2 = peg$FAILED;
|
|
1192
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1030
|
+
if (peg$silentFails === 0) { peg$fail(peg$e10); }
|
|
1193
1031
|
}
|
|
1194
1032
|
}
|
|
1195
1033
|
} else {
|
|
@@ -1197,7 +1035,7 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1197
1035
|
}
|
|
1198
1036
|
if (s1 !== peg$FAILED) {
|
|
1199
1037
|
peg$savedPos = s0;
|
|
1200
|
-
s1 = peg$
|
|
1038
|
+
s1 = peg$f13();
|
|
1201
1039
|
}
|
|
1202
1040
|
s0 = s1;
|
|
1203
1041
|
|
|
@@ -1210,21 +1048,21 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1210
1048
|
s0 = peg$currPos;
|
|
1211
1049
|
s1 = [];
|
|
1212
1050
|
s2 = input.charAt(peg$currPos);
|
|
1213
|
-
if (peg$
|
|
1051
|
+
if (peg$r4.test(s2)) {
|
|
1214
1052
|
peg$currPos++;
|
|
1215
1053
|
} else {
|
|
1216
1054
|
s2 = peg$FAILED;
|
|
1217
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1055
|
+
if (peg$silentFails === 0) { peg$fail(peg$e11); }
|
|
1218
1056
|
}
|
|
1219
1057
|
if (s2 !== peg$FAILED) {
|
|
1220
1058
|
while (s2 !== peg$FAILED) {
|
|
1221
1059
|
s1.push(s2);
|
|
1222
1060
|
s2 = input.charAt(peg$currPos);
|
|
1223
|
-
if (peg$
|
|
1061
|
+
if (peg$r4.test(s2)) {
|
|
1224
1062
|
peg$currPos++;
|
|
1225
1063
|
} else {
|
|
1226
1064
|
s2 = peg$FAILED;
|
|
1227
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1065
|
+
if (peg$silentFails === 0) { peg$fail(peg$e11); }
|
|
1228
1066
|
}
|
|
1229
1067
|
}
|
|
1230
1068
|
} else {
|
|
@@ -1232,7 +1070,7 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1232
1070
|
}
|
|
1233
1071
|
if (s1 !== peg$FAILED) {
|
|
1234
1072
|
peg$savedPos = s0;
|
|
1235
|
-
s1 = peg$
|
|
1073
|
+
s1 = peg$f14();
|
|
1236
1074
|
}
|
|
1237
1075
|
s0 = s1;
|
|
1238
1076
|
|
|
@@ -1268,18 +1106,41 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1268
1106
|
}
|
|
1269
1107
|
}
|
|
1270
1108
|
peg$savedPos = s0;
|
|
1271
|
-
s1 = peg$
|
|
1109
|
+
s1 = peg$f15(s1);
|
|
1272
1110
|
s0 = s1;
|
|
1273
1111
|
|
|
1274
1112
|
return s0;
|
|
1275
1113
|
}
|
|
1276
1114
|
|
|
1277
1115
|
function peg$parseFieldAttribute() {
|
|
1278
|
-
let s0;
|
|
1116
|
+
let s0, s1, s2;
|
|
1279
1117
|
|
|
1280
|
-
s0 = peg$
|
|
1118
|
+
s0 = peg$currPos;
|
|
1119
|
+
peg$savedPos = peg$currPos;
|
|
1120
|
+
s1 = peg$f16();
|
|
1121
|
+
if (s1) {
|
|
1122
|
+
s1 = undefined;
|
|
1123
|
+
} else {
|
|
1124
|
+
s1 = peg$FAILED;
|
|
1125
|
+
}
|
|
1126
|
+
if (s1 !== peg$FAILED) {
|
|
1127
|
+
s2 = peg$parseOptionsAttribute();
|
|
1128
|
+
if (s2 !== peg$FAILED) {
|
|
1129
|
+
s1 = [s1, s2];
|
|
1130
|
+
s0 = s1;
|
|
1131
|
+
} else {
|
|
1132
|
+
peg$currPos = s0;
|
|
1133
|
+
s0 = peg$FAILED;
|
|
1134
|
+
}
|
|
1135
|
+
} else {
|
|
1136
|
+
peg$currPos = s0;
|
|
1137
|
+
s0 = peg$FAILED;
|
|
1138
|
+
}
|
|
1281
1139
|
if (s0 === peg$FAILED) {
|
|
1282
1140
|
s0 = peg$parseRegularAttribute();
|
|
1141
|
+
if (s0 === peg$FAILED) {
|
|
1142
|
+
s0 = peg$parseOptionsAttribute();
|
|
1143
|
+
}
|
|
1283
1144
|
}
|
|
1284
1145
|
|
|
1285
1146
|
return s0;
|
|
@@ -1304,7 +1165,7 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1304
1165
|
if (s4 !== peg$FAILED) {
|
|
1305
1166
|
s5 = peg$parse_();
|
|
1306
1167
|
peg$savedPos = s0;
|
|
1307
|
-
s0 = peg$
|
|
1168
|
+
s0 = peg$f17(s1, s4);
|
|
1308
1169
|
} else {
|
|
1309
1170
|
peg$currPos = s0;
|
|
1310
1171
|
s0 = peg$FAILED;
|
|
@@ -1323,7 +1184,7 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1323
1184
|
if (s1 !== peg$FAILED) {
|
|
1324
1185
|
s2 = peg$parse_();
|
|
1325
1186
|
peg$savedPos = s0;
|
|
1326
|
-
s0 = peg$
|
|
1187
|
+
s0 = peg$f18(s1);
|
|
1327
1188
|
} else {
|
|
1328
1189
|
peg$currPos = s0;
|
|
1329
1190
|
s0 = peg$FAILED;
|
|
@@ -1351,7 +1212,7 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1351
1212
|
s4 = peg$parseOptionList();
|
|
1352
1213
|
if (s4 !== peg$FAILED) {
|
|
1353
1214
|
peg$savedPos = s0;
|
|
1354
|
-
s0 = peg$
|
|
1215
|
+
s0 = peg$f19(s1, s4);
|
|
1355
1216
|
} else {
|
|
1356
1217
|
peg$currPos = s0;
|
|
1357
1218
|
s0 = peg$FAILED;
|
|
@@ -1382,7 +1243,7 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1382
1243
|
peg$currPos++;
|
|
1383
1244
|
} else {
|
|
1384
1245
|
s5 = peg$FAILED;
|
|
1385
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1246
|
+
if (peg$silentFails === 0) { peg$fail(peg$e12); }
|
|
1386
1247
|
}
|
|
1387
1248
|
if (s5 !== peg$FAILED) {
|
|
1388
1249
|
s6 = peg$parse_();
|
|
@@ -1398,47 +1259,58 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1398
1259
|
peg$currPos = s3;
|
|
1399
1260
|
s3 = peg$FAILED;
|
|
1400
1261
|
}
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
s3 = s4;
|
|
1419
|
-
} else {
|
|
1420
|
-
peg$currPos = s3;
|
|
1421
|
-
s3 = peg$FAILED;
|
|
1422
|
-
}
|
|
1262
|
+
while (s3 !== peg$FAILED) {
|
|
1263
|
+
s2.push(s3);
|
|
1264
|
+
s3 = peg$currPos;
|
|
1265
|
+
s4 = peg$parse_();
|
|
1266
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1267
|
+
s5 = peg$c6;
|
|
1268
|
+
peg$currPos++;
|
|
1269
|
+
} else {
|
|
1270
|
+
s5 = peg$FAILED;
|
|
1271
|
+
if (peg$silentFails === 0) { peg$fail(peg$e12); }
|
|
1272
|
+
}
|
|
1273
|
+
if (s5 !== peg$FAILED) {
|
|
1274
|
+
s6 = peg$parse_();
|
|
1275
|
+
s7 = peg$parseOption();
|
|
1276
|
+
if (s7 !== peg$FAILED) {
|
|
1277
|
+
s4 = [s4, s5, s6, s7];
|
|
1278
|
+
s3 = s4;
|
|
1423
1279
|
} else {
|
|
1424
1280
|
peg$currPos = s3;
|
|
1425
1281
|
s3 = peg$FAILED;
|
|
1426
1282
|
}
|
|
1283
|
+
} else {
|
|
1284
|
+
peg$currPos = s3;
|
|
1285
|
+
s3 = peg$FAILED;
|
|
1427
1286
|
}
|
|
1428
|
-
} else {
|
|
1429
|
-
s2 = peg$FAILED;
|
|
1430
1287
|
}
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1288
|
+
s3 = peg$parse_();
|
|
1289
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1290
|
+
s4 = peg$c6;
|
|
1291
|
+
peg$currPos++;
|
|
1434
1292
|
} else {
|
|
1435
|
-
|
|
1436
|
-
|
|
1293
|
+
s4 = peg$FAILED;
|
|
1294
|
+
if (peg$silentFails === 0) { peg$fail(peg$e12); }
|
|
1295
|
+
}
|
|
1296
|
+
if (s4 === peg$FAILED) {
|
|
1297
|
+
s4 = null;
|
|
1437
1298
|
}
|
|
1299
|
+
peg$savedPos = s0;
|
|
1300
|
+
s0 = peg$f20(s1, s2);
|
|
1438
1301
|
} else {
|
|
1439
1302
|
peg$currPos = s0;
|
|
1440
1303
|
s0 = peg$FAILED;
|
|
1441
1304
|
}
|
|
1305
|
+
if (s0 === peg$FAILED) {
|
|
1306
|
+
s0 = peg$currPos;
|
|
1307
|
+
s1 = peg$parseOption();
|
|
1308
|
+
if (s1 !== peg$FAILED) {
|
|
1309
|
+
peg$savedPos = s0;
|
|
1310
|
+
s1 = peg$f21(s1);
|
|
1311
|
+
}
|
|
1312
|
+
s0 = s1;
|
|
1313
|
+
}
|
|
1442
1314
|
|
|
1443
1315
|
return s0;
|
|
1444
1316
|
}
|
|
@@ -1446,11 +1318,11 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1446
1318
|
function peg$parseAttributeValue() {
|
|
1447
1319
|
let s0;
|
|
1448
1320
|
|
|
1449
|
-
s0 = peg$
|
|
1321
|
+
s0 = peg$parseStringLiteral();
|
|
1450
1322
|
if (s0 === peg$FAILED) {
|
|
1451
|
-
s0 = peg$
|
|
1323
|
+
s0 = peg$parseUnquotedAttributeString();
|
|
1452
1324
|
if (s0 === peg$FAILED) {
|
|
1453
|
-
s0 = peg$
|
|
1325
|
+
s0 = peg$parseIdentifier();
|
|
1454
1326
|
}
|
|
1455
1327
|
}
|
|
1456
1328
|
|
|
@@ -1461,7 +1333,10 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1461
1333
|
let s0, s1;
|
|
1462
1334
|
|
|
1463
1335
|
s0 = peg$currPos;
|
|
1464
|
-
s1 = peg$
|
|
1336
|
+
s1 = peg$parseStringLiteral();
|
|
1337
|
+
if (s1 === peg$FAILED) {
|
|
1338
|
+
s1 = peg$parseUnquotedOptionString();
|
|
1339
|
+
}
|
|
1465
1340
|
if (s1 !== peg$FAILED) {
|
|
1466
1341
|
peg$savedPos = s0;
|
|
1467
1342
|
s1 = peg$f22(s1);
|
|
@@ -1471,38 +1346,402 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1471
1346
|
return s0;
|
|
1472
1347
|
}
|
|
1473
1348
|
|
|
1349
|
+
function peg$parseUnquotedOptionString() {
|
|
1350
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8;
|
|
1351
|
+
|
|
1352
|
+
s0 = peg$currPos;
|
|
1353
|
+
s1 = [];
|
|
1354
|
+
s2 = peg$currPos;
|
|
1355
|
+
s3 = peg$currPos;
|
|
1356
|
+
peg$silentFails++;
|
|
1357
|
+
s4 = peg$currPos;
|
|
1358
|
+
s5 = [];
|
|
1359
|
+
s6 = input.charAt(peg$currPos);
|
|
1360
|
+
if (peg$r5.test(s6)) {
|
|
1361
|
+
peg$currPos++;
|
|
1362
|
+
} else {
|
|
1363
|
+
s6 = peg$FAILED;
|
|
1364
|
+
if (peg$silentFails === 0) { peg$fail(peg$e13); }
|
|
1365
|
+
}
|
|
1366
|
+
if (s6 !== peg$FAILED) {
|
|
1367
|
+
while (s6 !== peg$FAILED) {
|
|
1368
|
+
s5.push(s6);
|
|
1369
|
+
s6 = input.charAt(peg$currPos);
|
|
1370
|
+
if (peg$r5.test(s6)) {
|
|
1371
|
+
peg$currPos++;
|
|
1372
|
+
} else {
|
|
1373
|
+
s6 = peg$FAILED;
|
|
1374
|
+
if (peg$silentFails === 0) { peg$fail(peg$e13); }
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
} else {
|
|
1378
|
+
s5 = peg$FAILED;
|
|
1379
|
+
}
|
|
1380
|
+
if (s5 !== peg$FAILED) {
|
|
1381
|
+
s6 = peg$parse_();
|
|
1382
|
+
s7 = peg$parseAttributeKey();
|
|
1383
|
+
if (s7 !== peg$FAILED) {
|
|
1384
|
+
if (input.charCodeAt(peg$currPos) === 58) {
|
|
1385
|
+
s8 = peg$c1;
|
|
1386
|
+
peg$currPos++;
|
|
1387
|
+
} else {
|
|
1388
|
+
s8 = peg$FAILED;
|
|
1389
|
+
if (peg$silentFails === 0) { peg$fail(peg$e2); }
|
|
1390
|
+
}
|
|
1391
|
+
if (s8 !== peg$FAILED) {
|
|
1392
|
+
s5 = [s5, s6, s7, s8];
|
|
1393
|
+
s4 = s5;
|
|
1394
|
+
} else {
|
|
1395
|
+
peg$currPos = s4;
|
|
1396
|
+
s4 = peg$FAILED;
|
|
1397
|
+
}
|
|
1398
|
+
} else {
|
|
1399
|
+
peg$currPos = s4;
|
|
1400
|
+
s4 = peg$FAILED;
|
|
1401
|
+
}
|
|
1402
|
+
} else {
|
|
1403
|
+
peg$currPos = s4;
|
|
1404
|
+
s4 = peg$FAILED;
|
|
1405
|
+
}
|
|
1406
|
+
peg$silentFails--;
|
|
1407
|
+
if (s4 === peg$FAILED) {
|
|
1408
|
+
s3 = undefined;
|
|
1409
|
+
} else {
|
|
1410
|
+
peg$currPos = s3;
|
|
1411
|
+
s3 = peg$FAILED;
|
|
1412
|
+
}
|
|
1413
|
+
if (s3 !== peg$FAILED) {
|
|
1414
|
+
s4 = input.charAt(peg$currPos);
|
|
1415
|
+
if (peg$r6.test(s4)) {
|
|
1416
|
+
peg$currPos++;
|
|
1417
|
+
} else {
|
|
1418
|
+
s4 = peg$FAILED;
|
|
1419
|
+
if (peg$silentFails === 0) { peg$fail(peg$e14); }
|
|
1420
|
+
}
|
|
1421
|
+
if (s4 !== peg$FAILED) {
|
|
1422
|
+
s3 = [s3, s4];
|
|
1423
|
+
s2 = s3;
|
|
1424
|
+
} else {
|
|
1425
|
+
peg$currPos = s2;
|
|
1426
|
+
s2 = peg$FAILED;
|
|
1427
|
+
}
|
|
1428
|
+
} else {
|
|
1429
|
+
peg$currPos = s2;
|
|
1430
|
+
s2 = peg$FAILED;
|
|
1431
|
+
}
|
|
1432
|
+
if (s2 !== peg$FAILED) {
|
|
1433
|
+
while (s2 !== peg$FAILED) {
|
|
1434
|
+
s1.push(s2);
|
|
1435
|
+
s2 = peg$currPos;
|
|
1436
|
+
s3 = peg$currPos;
|
|
1437
|
+
peg$silentFails++;
|
|
1438
|
+
s4 = peg$currPos;
|
|
1439
|
+
s5 = [];
|
|
1440
|
+
s6 = input.charAt(peg$currPos);
|
|
1441
|
+
if (peg$r5.test(s6)) {
|
|
1442
|
+
peg$currPos++;
|
|
1443
|
+
} else {
|
|
1444
|
+
s6 = peg$FAILED;
|
|
1445
|
+
if (peg$silentFails === 0) { peg$fail(peg$e13); }
|
|
1446
|
+
}
|
|
1447
|
+
if (s6 !== peg$FAILED) {
|
|
1448
|
+
while (s6 !== peg$FAILED) {
|
|
1449
|
+
s5.push(s6);
|
|
1450
|
+
s6 = input.charAt(peg$currPos);
|
|
1451
|
+
if (peg$r5.test(s6)) {
|
|
1452
|
+
peg$currPos++;
|
|
1453
|
+
} else {
|
|
1454
|
+
s6 = peg$FAILED;
|
|
1455
|
+
if (peg$silentFails === 0) { peg$fail(peg$e13); }
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
} else {
|
|
1459
|
+
s5 = peg$FAILED;
|
|
1460
|
+
}
|
|
1461
|
+
if (s5 !== peg$FAILED) {
|
|
1462
|
+
s6 = peg$parse_();
|
|
1463
|
+
s7 = peg$parseAttributeKey();
|
|
1464
|
+
if (s7 !== peg$FAILED) {
|
|
1465
|
+
if (input.charCodeAt(peg$currPos) === 58) {
|
|
1466
|
+
s8 = peg$c1;
|
|
1467
|
+
peg$currPos++;
|
|
1468
|
+
} else {
|
|
1469
|
+
s8 = peg$FAILED;
|
|
1470
|
+
if (peg$silentFails === 0) { peg$fail(peg$e2); }
|
|
1471
|
+
}
|
|
1472
|
+
if (s8 !== peg$FAILED) {
|
|
1473
|
+
s5 = [s5, s6, s7, s8];
|
|
1474
|
+
s4 = s5;
|
|
1475
|
+
} else {
|
|
1476
|
+
peg$currPos = s4;
|
|
1477
|
+
s4 = peg$FAILED;
|
|
1478
|
+
}
|
|
1479
|
+
} else {
|
|
1480
|
+
peg$currPos = s4;
|
|
1481
|
+
s4 = peg$FAILED;
|
|
1482
|
+
}
|
|
1483
|
+
} else {
|
|
1484
|
+
peg$currPos = s4;
|
|
1485
|
+
s4 = peg$FAILED;
|
|
1486
|
+
}
|
|
1487
|
+
peg$silentFails--;
|
|
1488
|
+
if (s4 === peg$FAILED) {
|
|
1489
|
+
s3 = undefined;
|
|
1490
|
+
} else {
|
|
1491
|
+
peg$currPos = s3;
|
|
1492
|
+
s3 = peg$FAILED;
|
|
1493
|
+
}
|
|
1494
|
+
if (s3 !== peg$FAILED) {
|
|
1495
|
+
s4 = input.charAt(peg$currPos);
|
|
1496
|
+
if (peg$r6.test(s4)) {
|
|
1497
|
+
peg$currPos++;
|
|
1498
|
+
} else {
|
|
1499
|
+
s4 = peg$FAILED;
|
|
1500
|
+
if (peg$silentFails === 0) { peg$fail(peg$e14); }
|
|
1501
|
+
}
|
|
1502
|
+
if (s4 !== peg$FAILED) {
|
|
1503
|
+
s3 = [s3, s4];
|
|
1504
|
+
s2 = s3;
|
|
1505
|
+
} else {
|
|
1506
|
+
peg$currPos = s2;
|
|
1507
|
+
s2 = peg$FAILED;
|
|
1508
|
+
}
|
|
1509
|
+
} else {
|
|
1510
|
+
peg$currPos = s2;
|
|
1511
|
+
s2 = peg$FAILED;
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
} else {
|
|
1515
|
+
s1 = peg$FAILED;
|
|
1516
|
+
}
|
|
1517
|
+
if (s1 !== peg$FAILED) {
|
|
1518
|
+
peg$savedPos = s0;
|
|
1519
|
+
s1 = peg$f23(s1);
|
|
1520
|
+
}
|
|
1521
|
+
s0 = s1;
|
|
1522
|
+
|
|
1523
|
+
return s0;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
function peg$parseUnquotedLine() {
|
|
1527
|
+
let s0, s1, s2, s3, s4, s5, s6, s7;
|
|
1528
|
+
|
|
1529
|
+
s0 = peg$currPos;
|
|
1530
|
+
s1 = peg$currPos;
|
|
1531
|
+
peg$silentFails++;
|
|
1532
|
+
s2 = peg$currPos;
|
|
1533
|
+
s3 = [];
|
|
1534
|
+
s4 = input.charAt(peg$currPos);
|
|
1535
|
+
if (peg$r5.test(s4)) {
|
|
1536
|
+
peg$currPos++;
|
|
1537
|
+
} else {
|
|
1538
|
+
s4 = peg$FAILED;
|
|
1539
|
+
if (peg$silentFails === 0) { peg$fail(peg$e13); }
|
|
1540
|
+
}
|
|
1541
|
+
if (s4 !== peg$FAILED) {
|
|
1542
|
+
while (s4 !== peg$FAILED) {
|
|
1543
|
+
s3.push(s4);
|
|
1544
|
+
s4 = input.charAt(peg$currPos);
|
|
1545
|
+
if (peg$r5.test(s4)) {
|
|
1546
|
+
peg$currPos++;
|
|
1547
|
+
} else {
|
|
1548
|
+
s4 = peg$FAILED;
|
|
1549
|
+
if (peg$silentFails === 0) { peg$fail(peg$e13); }
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
} else {
|
|
1553
|
+
s3 = peg$FAILED;
|
|
1554
|
+
}
|
|
1555
|
+
if (s3 !== peg$FAILED) {
|
|
1556
|
+
s4 = peg$parse_();
|
|
1557
|
+
if (input.charCodeAt(peg$currPos) === 45) {
|
|
1558
|
+
s5 = peg$c5;
|
|
1559
|
+
peg$currPos++;
|
|
1560
|
+
} else {
|
|
1561
|
+
s5 = peg$FAILED;
|
|
1562
|
+
if (peg$silentFails === 0) { peg$fail(peg$e8); }
|
|
1563
|
+
}
|
|
1564
|
+
if (s5 === peg$FAILED) {
|
|
1565
|
+
s5 = peg$currPos;
|
|
1566
|
+
s6 = peg$parseAttributeKey();
|
|
1567
|
+
if (s6 !== peg$FAILED) {
|
|
1568
|
+
if (input.charCodeAt(peg$currPos) === 58) {
|
|
1569
|
+
s7 = peg$c1;
|
|
1570
|
+
peg$currPos++;
|
|
1571
|
+
} else {
|
|
1572
|
+
s7 = peg$FAILED;
|
|
1573
|
+
if (peg$silentFails === 0) { peg$fail(peg$e2); }
|
|
1574
|
+
}
|
|
1575
|
+
if (s7 !== peg$FAILED) {
|
|
1576
|
+
s6 = [s6, s7];
|
|
1577
|
+
s5 = s6;
|
|
1578
|
+
} else {
|
|
1579
|
+
peg$currPos = s5;
|
|
1580
|
+
s5 = peg$FAILED;
|
|
1581
|
+
}
|
|
1582
|
+
} else {
|
|
1583
|
+
peg$currPos = s5;
|
|
1584
|
+
s5 = peg$FAILED;
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
if (s5 !== peg$FAILED) {
|
|
1588
|
+
s3 = [s3, s4, s5];
|
|
1589
|
+
s2 = s3;
|
|
1590
|
+
} else {
|
|
1591
|
+
peg$currPos = s2;
|
|
1592
|
+
s2 = peg$FAILED;
|
|
1593
|
+
}
|
|
1594
|
+
} else {
|
|
1595
|
+
peg$currPos = s2;
|
|
1596
|
+
s2 = peg$FAILED;
|
|
1597
|
+
}
|
|
1598
|
+
peg$silentFails--;
|
|
1599
|
+
if (s2 === peg$FAILED) {
|
|
1600
|
+
s1 = undefined;
|
|
1601
|
+
} else {
|
|
1602
|
+
peg$currPos = s1;
|
|
1603
|
+
s1 = peg$FAILED;
|
|
1604
|
+
}
|
|
1605
|
+
if (s1 !== peg$FAILED) {
|
|
1606
|
+
s2 = input.charAt(peg$currPos);
|
|
1607
|
+
if (peg$r7.test(s2)) {
|
|
1608
|
+
peg$currPos++;
|
|
1609
|
+
} else {
|
|
1610
|
+
s2 = peg$FAILED;
|
|
1611
|
+
if (peg$silentFails === 0) { peg$fail(peg$e15); }
|
|
1612
|
+
}
|
|
1613
|
+
if (s2 !== peg$FAILED) {
|
|
1614
|
+
peg$savedPos = s0;
|
|
1615
|
+
s0 = peg$f24(s2);
|
|
1616
|
+
} else {
|
|
1617
|
+
peg$currPos = s0;
|
|
1618
|
+
s0 = peg$FAILED;
|
|
1619
|
+
}
|
|
1620
|
+
} else {
|
|
1621
|
+
peg$currPos = s0;
|
|
1622
|
+
s0 = peg$FAILED;
|
|
1623
|
+
}
|
|
1624
|
+
if (s0 === peg$FAILED) {
|
|
1625
|
+
s0 = peg$currPos;
|
|
1626
|
+
s1 = [];
|
|
1627
|
+
s2 = input.charAt(peg$currPos);
|
|
1628
|
+
if (peg$r5.test(s2)) {
|
|
1629
|
+
peg$currPos++;
|
|
1630
|
+
} else {
|
|
1631
|
+
s2 = peg$FAILED;
|
|
1632
|
+
if (peg$silentFails === 0) { peg$fail(peg$e13); }
|
|
1633
|
+
}
|
|
1634
|
+
if (s2 !== peg$FAILED) {
|
|
1635
|
+
while (s2 !== peg$FAILED) {
|
|
1636
|
+
s1.push(s2);
|
|
1637
|
+
s2 = input.charAt(peg$currPos);
|
|
1638
|
+
if (peg$r5.test(s2)) {
|
|
1639
|
+
peg$currPos++;
|
|
1640
|
+
} else {
|
|
1641
|
+
s2 = peg$FAILED;
|
|
1642
|
+
if (peg$silentFails === 0) { peg$fail(peg$e13); }
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
} else {
|
|
1646
|
+
s1 = peg$FAILED;
|
|
1647
|
+
}
|
|
1648
|
+
if (s1 !== peg$FAILED) {
|
|
1649
|
+
s2 = peg$currPos;
|
|
1650
|
+
peg$silentFails++;
|
|
1651
|
+
s3 = peg$currPos;
|
|
1652
|
+
s4 = peg$parse_();
|
|
1653
|
+
if (input.charCodeAt(peg$currPos) === 45) {
|
|
1654
|
+
s5 = peg$c5;
|
|
1655
|
+
peg$currPos++;
|
|
1656
|
+
} else {
|
|
1657
|
+
s5 = peg$FAILED;
|
|
1658
|
+
if (peg$silentFails === 0) { peg$fail(peg$e8); }
|
|
1659
|
+
}
|
|
1660
|
+
if (s5 === peg$FAILED) {
|
|
1661
|
+
s5 = peg$currPos;
|
|
1662
|
+
s6 = peg$parseAttributeKey();
|
|
1663
|
+
if (s6 !== peg$FAILED) {
|
|
1664
|
+
if (input.charCodeAt(peg$currPos) === 58) {
|
|
1665
|
+
s7 = peg$c1;
|
|
1666
|
+
peg$currPos++;
|
|
1667
|
+
} else {
|
|
1668
|
+
s7 = peg$FAILED;
|
|
1669
|
+
if (peg$silentFails === 0) { peg$fail(peg$e2); }
|
|
1670
|
+
}
|
|
1671
|
+
if (s7 !== peg$FAILED) {
|
|
1672
|
+
s6 = [s6, s7];
|
|
1673
|
+
s5 = s6;
|
|
1674
|
+
} else {
|
|
1675
|
+
peg$currPos = s5;
|
|
1676
|
+
s5 = peg$FAILED;
|
|
1677
|
+
}
|
|
1678
|
+
} else {
|
|
1679
|
+
peg$currPos = s5;
|
|
1680
|
+
s5 = peg$FAILED;
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
if (s5 !== peg$FAILED) {
|
|
1684
|
+
s4 = [s4, s5];
|
|
1685
|
+
s3 = s4;
|
|
1686
|
+
} else {
|
|
1687
|
+
peg$currPos = s3;
|
|
1688
|
+
s3 = peg$FAILED;
|
|
1689
|
+
}
|
|
1690
|
+
peg$silentFails--;
|
|
1691
|
+
if (s3 === peg$FAILED) {
|
|
1692
|
+
s2 = undefined;
|
|
1693
|
+
} else {
|
|
1694
|
+
peg$currPos = s2;
|
|
1695
|
+
s2 = peg$FAILED;
|
|
1696
|
+
}
|
|
1697
|
+
if (s2 !== peg$FAILED) {
|
|
1698
|
+
peg$savedPos = s0;
|
|
1699
|
+
s0 = peg$f25();
|
|
1700
|
+
} else {
|
|
1701
|
+
peg$currPos = s0;
|
|
1702
|
+
s0 = peg$FAILED;
|
|
1703
|
+
}
|
|
1704
|
+
} else {
|
|
1705
|
+
peg$currPos = s0;
|
|
1706
|
+
s0 = peg$FAILED;
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
return s0;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1474
1713
|
function peg$parseAttributeKey() {
|
|
1475
1714
|
let s0, s1, s2, s3;
|
|
1476
1715
|
|
|
1477
1716
|
s0 = peg$currPos;
|
|
1478
1717
|
s1 = input.charAt(peg$currPos);
|
|
1479
|
-
if (peg$
|
|
1718
|
+
if (peg$r8.test(s1)) {
|
|
1480
1719
|
peg$currPos++;
|
|
1481
1720
|
} else {
|
|
1482
1721
|
s1 = peg$FAILED;
|
|
1483
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1722
|
+
if (peg$silentFails === 0) { peg$fail(peg$e16); }
|
|
1484
1723
|
}
|
|
1485
1724
|
if (s1 !== peg$FAILED) {
|
|
1486
1725
|
s2 = [];
|
|
1487
1726
|
s3 = input.charAt(peg$currPos);
|
|
1488
|
-
if (peg$
|
|
1727
|
+
if (peg$r9.test(s3)) {
|
|
1489
1728
|
peg$currPos++;
|
|
1490
1729
|
} else {
|
|
1491
1730
|
s3 = peg$FAILED;
|
|
1492
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1731
|
+
if (peg$silentFails === 0) { peg$fail(peg$e17); }
|
|
1493
1732
|
}
|
|
1494
1733
|
while (s3 !== peg$FAILED) {
|
|
1495
1734
|
s2.push(s3);
|
|
1496
1735
|
s3 = input.charAt(peg$currPos);
|
|
1497
|
-
if (peg$
|
|
1736
|
+
if (peg$r9.test(s3)) {
|
|
1498
1737
|
peg$currPos++;
|
|
1499
1738
|
} else {
|
|
1500
1739
|
s3 = peg$FAILED;
|
|
1501
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1740
|
+
if (peg$silentFails === 0) { peg$fail(peg$e17); }
|
|
1502
1741
|
}
|
|
1503
1742
|
}
|
|
1504
1743
|
peg$savedPos = s0;
|
|
1505
|
-
s0 = peg$
|
|
1744
|
+
s0 = peg$f26();
|
|
1506
1745
|
} else {
|
|
1507
1746
|
peg$currPos = s0;
|
|
1508
1747
|
s0 = peg$FAILED;
|
|
@@ -1516,33 +1755,33 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1516
1755
|
|
|
1517
1756
|
s0 = peg$currPos;
|
|
1518
1757
|
s1 = input.charAt(peg$currPos);
|
|
1519
|
-
if (peg$
|
|
1758
|
+
if (peg$r8.test(s1)) {
|
|
1520
1759
|
peg$currPos++;
|
|
1521
1760
|
} else {
|
|
1522
1761
|
s1 = peg$FAILED;
|
|
1523
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1762
|
+
if (peg$silentFails === 0) { peg$fail(peg$e16); }
|
|
1524
1763
|
}
|
|
1525
1764
|
if (s1 !== peg$FAILED) {
|
|
1526
1765
|
s2 = [];
|
|
1527
1766
|
s3 = input.charAt(peg$currPos);
|
|
1528
|
-
if (peg$
|
|
1767
|
+
if (peg$r3.test(s3)) {
|
|
1529
1768
|
peg$currPos++;
|
|
1530
1769
|
} else {
|
|
1531
1770
|
s3 = peg$FAILED;
|
|
1532
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1771
|
+
if (peg$silentFails === 0) { peg$fail(peg$e10); }
|
|
1533
1772
|
}
|
|
1534
1773
|
while (s3 !== peg$FAILED) {
|
|
1535
1774
|
s2.push(s3);
|
|
1536
1775
|
s3 = input.charAt(peg$currPos);
|
|
1537
|
-
if (peg$
|
|
1776
|
+
if (peg$r3.test(s3)) {
|
|
1538
1777
|
peg$currPos++;
|
|
1539
1778
|
} else {
|
|
1540
1779
|
s3 = peg$FAILED;
|
|
1541
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1780
|
+
if (peg$silentFails === 0) { peg$fail(peg$e10); }
|
|
1542
1781
|
}
|
|
1543
1782
|
}
|
|
1544
1783
|
peg$savedPos = s0;
|
|
1545
|
-
s0 = peg$
|
|
1784
|
+
s0 = peg$f27();
|
|
1546
1785
|
} else {
|
|
1547
1786
|
peg$currPos = s0;
|
|
1548
1787
|
s0 = peg$FAILED;
|
|
@@ -1556,20 +1795,20 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1556
1795
|
|
|
1557
1796
|
s0 = [];
|
|
1558
1797
|
s1 = input.charAt(peg$currPos);
|
|
1559
|
-
if (peg$
|
|
1798
|
+
if (peg$r10.test(s1)) {
|
|
1560
1799
|
peg$currPos++;
|
|
1561
1800
|
} else {
|
|
1562
1801
|
s1 = peg$FAILED;
|
|
1563
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1802
|
+
if (peg$silentFails === 0) { peg$fail(peg$e18); }
|
|
1564
1803
|
}
|
|
1565
1804
|
while (s1 !== peg$FAILED) {
|
|
1566
1805
|
s0.push(s1);
|
|
1567
1806
|
s1 = input.charAt(peg$currPos);
|
|
1568
|
-
if (peg$
|
|
1807
|
+
if (peg$r10.test(s1)) {
|
|
1569
1808
|
peg$currPos++;
|
|
1570
1809
|
} else {
|
|
1571
1810
|
s1 = peg$FAILED;
|
|
1572
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1811
|
+
if (peg$silentFails === 0) { peg$fail(peg$e18); }
|
|
1573
1812
|
}
|
|
1574
1813
|
}
|
|
1575
1814
|
|
|
@@ -1581,73 +1820,33 @@ return createNode('Identifier', location().start, location().end, { value: text(
|
|
|
1581
1820
|
|
|
1582
1821
|
s0 = peg$currPos;
|
|
1583
1822
|
s1 = input.charAt(peg$currPos);
|
|
1584
|
-
if (peg$
|
|
1585
|
-
peg$currPos++;
|
|
1586
|
-
} else {
|
|
1587
|
-
s1 = peg$FAILED;
|
|
1588
|
-
if (peg$silentFails === 0) { peg$fail(peg$e17); }
|
|
1589
|
-
}
|
|
1590
|
-
if (s1 !== peg$FAILED) {
|
|
1591
|
-
s2 = [];
|
|
1592
|
-
s3 = input.charAt(peg$currPos);
|
|
1593
|
-
if (peg$r4.test(s3)) {
|
|
1594
|
-
peg$currPos++;
|
|
1595
|
-
} else {
|
|
1596
|
-
s3 = peg$FAILED;
|
|
1597
|
-
if (peg$silentFails === 0) { peg$fail(peg$e11); }
|
|
1598
|
-
}
|
|
1599
|
-
while (s3 !== peg$FAILED) {
|
|
1600
|
-
s2.push(s3);
|
|
1601
|
-
s3 = input.charAt(peg$currPos);
|
|
1602
|
-
if (peg$r4.test(s3)) {
|
|
1603
|
-
peg$currPos++;
|
|
1604
|
-
} else {
|
|
1605
|
-
s3 = peg$FAILED;
|
|
1606
|
-
if (peg$silentFails === 0) { peg$fail(peg$e11); }
|
|
1607
|
-
}
|
|
1608
|
-
}
|
|
1609
|
-
peg$savedPos = s0;
|
|
1610
|
-
s0 = peg$f25();
|
|
1611
|
-
} else {
|
|
1612
|
-
peg$currPos = s0;
|
|
1613
|
-
s0 = peg$FAILED;
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
return s0;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
function peg$parseExtendedIdentifier() {
|
|
1620
|
-
let s0, s1, s2, s3;
|
|
1621
|
-
|
|
1622
|
-
s0 = peg$currPos;
|
|
1623
|
-
s1 = input.charAt(peg$currPos);
|
|
1624
|
-
if (peg$r9.test(s1)) {
|
|
1823
|
+
if (peg$r11.test(s1)) {
|
|
1625
1824
|
peg$currPos++;
|
|
1626
1825
|
} else {
|
|
1627
1826
|
s1 = peg$FAILED;
|
|
1628
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1827
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
1629
1828
|
}
|
|
1630
1829
|
if (s1 !== peg$FAILED) {
|
|
1631
1830
|
s2 = [];
|
|
1632
1831
|
s3 = input.charAt(peg$currPos);
|
|
1633
|
-
if (peg$
|
|
1832
|
+
if (peg$r3.test(s3)) {
|
|
1634
1833
|
peg$currPos++;
|
|
1635
1834
|
} else {
|
|
1636
1835
|
s3 = peg$FAILED;
|
|
1637
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1836
|
+
if (peg$silentFails === 0) { peg$fail(peg$e10); }
|
|
1638
1837
|
}
|
|
1639
1838
|
while (s3 !== peg$FAILED) {
|
|
1640
1839
|
s2.push(s3);
|
|
1641
1840
|
s3 = input.charAt(peg$currPos);
|
|
1642
|
-
if (peg$
|
|
1841
|
+
if (peg$r3.test(s3)) {
|
|
1643
1842
|
peg$currPos++;
|
|
1644
1843
|
} else {
|
|
1645
1844
|
s3 = peg$FAILED;
|
|
1646
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1845
|
+
if (peg$silentFails === 0) { peg$fail(peg$e10); }
|
|
1647
1846
|
}
|
|
1648
1847
|
}
|
|
1649
1848
|
peg$savedPos = s0;
|
|
1650
|
-
s0 = peg$
|
|
1849
|
+
s0 = peg$f28();
|
|
1651
1850
|
} else {
|
|
1652
1851
|
peg$currPos = s0;
|
|
1653
1852
|
s0 = peg$FAILED;
|
|
@@ -1725,4 +1924,3 @@ export default {
|
|
|
1725
1924
|
SyntaxError: peg$SyntaxError,
|
|
1726
1925
|
parse: peg$parse
|
|
1727
1926
|
};
|
|
1728
|
-
|