intl-messageformat 7.8.4 → 8.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/README.md +19 -16
- package/dist/core.d.ts +3 -4
- package/dist/core.js +20 -4
- package/dist/error.d.ts +16 -0
- package/dist/error.js +44 -0
- package/dist/formatters.d.ts +7 -9
- package/dist/formatters.js +27 -169
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/umd/intl-messageformat.js +767 -416
- package/dist/umd/intl-messageformat.js.map +1 -1
- package/dist/umd/intl-messageformat.min.js +1 -1
- package/dist/umd/intl-messageformat.min.js.map +1 -1
- package/lib/core.d.ts +3 -4
- package/lib/core.js +21 -5
- package/lib/error.d.ts +16 -0
- package/lib/error.js +42 -0
- package/lib/formatters.d.ts +7 -9
- package/lib/formatters.js +28 -168
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/intl-messageformat.d.ts +30 -15
- package/package.json +3 -3
- package/src/core.ts +29 -24
- package/src/error.ts +39 -0
- package/src/formatters.ts +69 -245
- package/src/index.ts +1 -0
|
@@ -39,6 +39,10 @@
|
|
|
39
39
|
* This is the `#` symbol that will be substituted with the count.
|
|
40
40
|
*/
|
|
41
41
|
TYPE[TYPE["pound"] = 7] = "pound";
|
|
42
|
+
/**
|
|
43
|
+
* XML-like tag
|
|
44
|
+
*/
|
|
45
|
+
TYPE[TYPE["tag"] = 8] = "tag";
|
|
42
46
|
})(TYPE || (TYPE = {}));
|
|
43
47
|
/**
|
|
44
48
|
* Type Guards
|
|
@@ -67,6 +71,9 @@
|
|
|
67
71
|
function isPoundElement(el) {
|
|
68
72
|
return el.type === TYPE.pound;
|
|
69
73
|
}
|
|
74
|
+
function isTagElement(el) {
|
|
75
|
+
return el.type === TYPE.tag;
|
|
76
|
+
}
|
|
70
77
|
function isNumberSkeleton(el) {
|
|
71
78
|
return !!(el && typeof el === 'object' && el.type === 0 /* number */);
|
|
72
79
|
}
|
|
@@ -215,67 +222,91 @@
|
|
|
215
222
|
var peg$c4 = function () {
|
|
216
223
|
return __assign({ type: TYPE.pound }, insertLocation());
|
|
217
224
|
};
|
|
218
|
-
var peg$c5 = peg$otherExpectation("
|
|
219
|
-
var peg$c6 = "
|
|
220
|
-
var peg$c7 = peg$literalExpectation("
|
|
221
|
-
var peg$c8 = "
|
|
222
|
-
var peg$c9 = peg$literalExpectation("
|
|
225
|
+
var peg$c5 = peg$otherExpectation("tagElement");
|
|
226
|
+
var peg$c6 = "<";
|
|
227
|
+
var peg$c7 = peg$literalExpectation("<", false);
|
|
228
|
+
var peg$c8 = "/>";
|
|
229
|
+
var peg$c9 = peg$literalExpectation("/>", false);
|
|
223
230
|
var peg$c10 = function (value) {
|
|
231
|
+
return __assign({ type: TYPE.literal, value: value.join('') }, insertLocation());
|
|
232
|
+
};
|
|
233
|
+
var peg$c11 = function (open, children, close) {
|
|
234
|
+
if (open !== close) {
|
|
235
|
+
error("Mismatch tag \"" + open + "\" !== \"" + close + "\"", location());
|
|
236
|
+
}
|
|
237
|
+
return __assign({ type: TYPE.tag, value: open, children: children }, insertLocation());
|
|
238
|
+
};
|
|
239
|
+
var peg$c12 = function () { messageCtx.push('openingTag'); return true; };
|
|
240
|
+
var peg$c13 = ">";
|
|
241
|
+
var peg$c14 = peg$literalExpectation(">", false);
|
|
242
|
+
var peg$c15 = function (tag) { messageCtx.pop(); return true; };
|
|
243
|
+
var peg$c16 = function (tag) {
|
|
244
|
+
return tag;
|
|
245
|
+
};
|
|
246
|
+
var peg$c17 = "</";
|
|
247
|
+
var peg$c18 = peg$literalExpectation("</", false);
|
|
248
|
+
var peg$c19 = function () { messageCtx.push('closingTag'); return true; };
|
|
249
|
+
var peg$c20 = peg$otherExpectation("argumentElement");
|
|
250
|
+
var peg$c21 = "{";
|
|
251
|
+
var peg$c22 = peg$literalExpectation("{", false);
|
|
252
|
+
var peg$c23 = "}";
|
|
253
|
+
var peg$c24 = peg$literalExpectation("}", false);
|
|
254
|
+
var peg$c25 = function (value) {
|
|
224
255
|
return __assign({ type: TYPE.argument, value: value }, insertLocation());
|
|
225
256
|
};
|
|
226
|
-
var peg$
|
|
227
|
-
var peg$
|
|
228
|
-
var peg$
|
|
229
|
-
var peg$
|
|
230
|
-
var peg$
|
|
231
|
-
var peg$
|
|
232
|
-
var peg$
|
|
233
|
-
var peg$
|
|
234
|
-
var peg$
|
|
235
|
-
var peg$
|
|
257
|
+
var peg$c26 = peg$otherExpectation("numberSkeletonId");
|
|
258
|
+
var peg$c27 = /^['\/{}]/;
|
|
259
|
+
var peg$c28 = peg$classExpectation(["'", "/", "{", "}"], false, false);
|
|
260
|
+
var peg$c29 = peg$anyExpectation();
|
|
261
|
+
var peg$c30 = peg$otherExpectation("numberSkeletonTokenOption");
|
|
262
|
+
var peg$c31 = "/";
|
|
263
|
+
var peg$c32 = peg$literalExpectation("/", false);
|
|
264
|
+
var peg$c33 = function (option) { return option; };
|
|
265
|
+
var peg$c34 = peg$otherExpectation("numberSkeletonToken");
|
|
266
|
+
var peg$c35 = function (stem, options) {
|
|
236
267
|
return { stem: stem, options: options };
|
|
237
268
|
};
|
|
238
|
-
var peg$
|
|
269
|
+
var peg$c36 = function (tokens) {
|
|
239
270
|
return __assign({ type: 0 /* number */, tokens: tokens }, insertLocation());
|
|
240
271
|
};
|
|
241
|
-
var peg$
|
|
242
|
-
var peg$
|
|
243
|
-
var peg$
|
|
244
|
-
var peg$
|
|
245
|
-
var peg$
|
|
272
|
+
var peg$c37 = "::";
|
|
273
|
+
var peg$c38 = peg$literalExpectation("::", false);
|
|
274
|
+
var peg$c39 = function (skeleton) { return skeleton; };
|
|
275
|
+
var peg$c40 = function () { messageCtx.push('numberArgStyle'); return true; };
|
|
276
|
+
var peg$c41 = function (style) {
|
|
246
277
|
messageCtx.pop();
|
|
247
278
|
return style.replace(/\s*$/, '');
|
|
248
279
|
};
|
|
249
|
-
var peg$
|
|
250
|
-
var peg$
|
|
251
|
-
var peg$
|
|
252
|
-
var peg$
|
|
253
|
-
var peg$
|
|
280
|
+
var peg$c42 = ",";
|
|
281
|
+
var peg$c43 = peg$literalExpectation(",", false);
|
|
282
|
+
var peg$c44 = "number";
|
|
283
|
+
var peg$c45 = peg$literalExpectation("number", false);
|
|
284
|
+
var peg$c46 = function (value, type, style) {
|
|
254
285
|
return __assign({ type: type === 'number' ? TYPE.number : type === 'date' ? TYPE.date : TYPE.time, style: style && style[2], value: value }, insertLocation());
|
|
255
286
|
};
|
|
256
|
-
var peg$
|
|
257
|
-
var peg$
|
|
258
|
-
var peg$
|
|
259
|
-
var peg$
|
|
260
|
-
var peg$
|
|
261
|
-
var peg$
|
|
262
|
-
var peg$
|
|
263
|
-
var peg$
|
|
264
|
-
var peg$
|
|
287
|
+
var peg$c47 = "'";
|
|
288
|
+
var peg$c48 = peg$literalExpectation("'", false);
|
|
289
|
+
var peg$c49 = /^[^']/;
|
|
290
|
+
var peg$c50 = peg$classExpectation(["'"], true, false);
|
|
291
|
+
var peg$c51 = /^[^a-zA-Z'{}]/;
|
|
292
|
+
var peg$c52 = peg$classExpectation([["a", "z"], ["A", "Z"], "'", "{", "}"], true, false);
|
|
293
|
+
var peg$c53 = /^[a-zA-Z]/;
|
|
294
|
+
var peg$c54 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false);
|
|
295
|
+
var peg$c55 = function (pattern) {
|
|
265
296
|
return __assign({ type: 1 /* dateTime */, pattern: pattern }, insertLocation());
|
|
266
297
|
};
|
|
267
|
-
var peg$
|
|
268
|
-
var peg$
|
|
269
|
-
var peg$
|
|
270
|
-
var peg$
|
|
271
|
-
var peg$
|
|
272
|
-
var peg$
|
|
273
|
-
var peg$
|
|
274
|
-
var peg$
|
|
275
|
-
var peg$
|
|
276
|
-
var peg$
|
|
277
|
-
var peg$
|
|
278
|
-
var peg$
|
|
298
|
+
var peg$c56 = function () { messageCtx.push('dateOrTimeArgStyle'); return true; };
|
|
299
|
+
var peg$c57 = "date";
|
|
300
|
+
var peg$c58 = peg$literalExpectation("date", false);
|
|
301
|
+
var peg$c59 = "time";
|
|
302
|
+
var peg$c60 = peg$literalExpectation("time", false);
|
|
303
|
+
var peg$c61 = "plural";
|
|
304
|
+
var peg$c62 = peg$literalExpectation("plural", false);
|
|
305
|
+
var peg$c63 = "selectordinal";
|
|
306
|
+
var peg$c64 = peg$literalExpectation("selectordinal", false);
|
|
307
|
+
var peg$c65 = "offset:";
|
|
308
|
+
var peg$c66 = peg$literalExpectation("offset:", false);
|
|
309
|
+
var peg$c67 = function (value, pluralType, offset, options) {
|
|
279
310
|
return __assign({ type: TYPE.plural, pluralType: pluralType === 'plural' ? 'cardinal' : 'ordinal', value: value, offset: offset ? offset[2] : 0, options: options.reduce(function (all, _a) {
|
|
280
311
|
var id = _a.id, value = _a.value, optionLocation = _a.location;
|
|
281
312
|
if (id in all) {
|
|
@@ -288,9 +319,9 @@
|
|
|
288
319
|
return all;
|
|
289
320
|
}, {}) }, insertLocation());
|
|
290
321
|
};
|
|
291
|
-
var peg$
|
|
292
|
-
var peg$
|
|
293
|
-
var peg$
|
|
322
|
+
var peg$c68 = "select";
|
|
323
|
+
var peg$c69 = peg$literalExpectation("select", false);
|
|
324
|
+
var peg$c70 = function (value, options) {
|
|
294
325
|
return __assign({ type: TYPE.select, value: value, options: options.reduce(function (all, _a) {
|
|
295
326
|
var id = _a.id, value = _a.value, optionLocation = _a.location;
|
|
296
327
|
if (id in all) {
|
|
@@ -303,67 +334,71 @@
|
|
|
303
334
|
return all;
|
|
304
335
|
}, {}) }, insertLocation());
|
|
305
336
|
};
|
|
306
|
-
var peg$
|
|
307
|
-
var peg$
|
|
308
|
-
var peg$
|
|
309
|
-
var peg$
|
|
337
|
+
var peg$c71 = "=";
|
|
338
|
+
var peg$c72 = peg$literalExpectation("=", false);
|
|
339
|
+
var peg$c73 = function (id) { messageCtx.push('select'); return true; };
|
|
340
|
+
var peg$c74 = function (id, value) {
|
|
310
341
|
messageCtx.pop();
|
|
311
342
|
return __assign({ id: id,
|
|
312
343
|
value: value }, insertLocation());
|
|
313
344
|
};
|
|
314
|
-
var peg$
|
|
315
|
-
var peg$
|
|
345
|
+
var peg$c75 = function (id) { messageCtx.push('plural'); return true; };
|
|
346
|
+
var peg$c76 = function (id, value) {
|
|
316
347
|
messageCtx.pop();
|
|
317
348
|
return __assign({ id: id,
|
|
318
349
|
value: value }, insertLocation());
|
|
319
350
|
};
|
|
320
|
-
var peg$
|
|
321
|
-
var peg$
|
|
322
|
-
var peg$
|
|
323
|
-
var peg$
|
|
324
|
-
var peg$
|
|
325
|
-
var peg$
|
|
326
|
-
var peg$
|
|
327
|
-
var peg$
|
|
328
|
-
var peg$
|
|
329
|
-
var peg$
|
|
330
|
-
var peg$
|
|
351
|
+
var peg$c77 = peg$otherExpectation("whitespace");
|
|
352
|
+
var peg$c78 = /^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
|
|
353
|
+
var peg$c79 = peg$classExpectation([["\t", "\r"], " ", "\x85", "\xA0", "\u1680", ["\u2000", "\u200A"], "\u2028", "\u2029", "\u202F", "\u205F", "\u3000"], false, false);
|
|
354
|
+
var peg$c80 = peg$otherExpectation("syntax pattern");
|
|
355
|
+
var peg$c81 = /^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/;
|
|
356
|
+
var peg$c82 = peg$classExpectation([["!", "/"], [":", "@"], ["[", "^"], "`", ["{", "~"], ["\xA1", "\xA7"], "\xA9", "\xAB", "\xAC", "\xAE", "\xB0", "\xB1", "\xB6", "\xBB", "\xBF", "\xD7", "\xF7", ["\u2010", "\u2027"], ["\u2030", "\u203E"], ["\u2041", "\u2053"], ["\u2055", "\u205E"], ["\u2190", "\u245F"], ["\u2500", "\u2775"], ["\u2794", "\u2BFF"], ["\u2E00", "\u2E7F"], ["\u3001", "\u3003"], ["\u3008", "\u3020"], "\u3030", "\uFD3E", "\uFD3F", "\uFE45", "\uFE46"], false, false);
|
|
357
|
+
var peg$c83 = peg$otherExpectation("optional whitespace");
|
|
358
|
+
var peg$c84 = peg$otherExpectation("number");
|
|
359
|
+
var peg$c85 = "-";
|
|
360
|
+
var peg$c86 = peg$literalExpectation("-", false);
|
|
361
|
+
var peg$c87 = function (negative, num) {
|
|
331
362
|
return num
|
|
332
363
|
? negative
|
|
333
364
|
? -num
|
|
334
365
|
: num
|
|
335
366
|
: 0;
|
|
336
367
|
};
|
|
337
|
-
var peg$
|
|
338
|
-
var peg$
|
|
339
|
-
var peg$
|
|
340
|
-
var peg$
|
|
341
|
-
var peg$
|
|
368
|
+
var peg$c89 = peg$otherExpectation("double apostrophes");
|
|
369
|
+
var peg$c90 = "''";
|
|
370
|
+
var peg$c91 = peg$literalExpectation("''", false);
|
|
371
|
+
var peg$c92 = function () { return "'"; };
|
|
372
|
+
var peg$c93 = function (escapedChar, quotedChars) {
|
|
342
373
|
return escapedChar + quotedChars.replace("''", "'");
|
|
343
374
|
};
|
|
344
|
-
var peg$
|
|
345
|
-
return (x !== '
|
|
375
|
+
var peg$c94 = function (x) {
|
|
376
|
+
return (x !== '<' &&
|
|
377
|
+
x !== '{' &&
|
|
346
378
|
!(isInPluralOption() && x === '#') &&
|
|
347
|
-
!(isNestedMessageText() && x === '}')
|
|
379
|
+
!(isNestedMessageText() && x === '}') &&
|
|
380
|
+
!(isNestedMessageText() && x === '>'));
|
|
348
381
|
};
|
|
349
|
-
var peg$
|
|
350
|
-
var peg$
|
|
351
|
-
var peg$
|
|
352
|
-
return x === '{' || x === '}' || (isInPluralOption() && x === '#');
|
|
382
|
+
var peg$c95 = "\n";
|
|
383
|
+
var peg$c96 = peg$literalExpectation("\n", false);
|
|
384
|
+
var peg$c97 = function (x) {
|
|
385
|
+
return x === '<' || x === '>' || x === '{' || x === '}' || (isInPluralOption() && x === '#');
|
|
353
386
|
};
|
|
354
|
-
var peg$
|
|
355
|
-
var peg$
|
|
356
|
-
var peg$
|
|
357
|
-
var peg$
|
|
358
|
-
var peg$
|
|
359
|
-
var peg$
|
|
360
|
-
var peg$
|
|
361
|
-
var peg$
|
|
362
|
-
var peg$
|
|
363
|
-
var peg$
|
|
387
|
+
var peg$c98 = peg$otherExpectation("argNameOrNumber");
|
|
388
|
+
var peg$c99 = peg$otherExpectation("validTag");
|
|
389
|
+
var peg$c100 = peg$otherExpectation("argNumber");
|
|
390
|
+
var peg$c101 = "0";
|
|
391
|
+
var peg$c102 = peg$literalExpectation("0", false);
|
|
392
|
+
var peg$c103 = function () { return 0; };
|
|
393
|
+
var peg$c104 = /^[1-9]/;
|
|
394
|
+
var peg$c105 = peg$classExpectation([["1", "9"]], false, false);
|
|
395
|
+
var peg$c106 = /^[0-9]/;
|
|
396
|
+
var peg$c107 = peg$classExpectation([["0", "9"]], false, false);
|
|
397
|
+
var peg$c108 = function (digits) {
|
|
364
398
|
return parseInt(digits.join(''), 10);
|
|
365
399
|
};
|
|
366
|
-
var peg$
|
|
400
|
+
var peg$c109 = peg$otherExpectation("argName");
|
|
401
|
+
var peg$c110 = peg$otherExpectation("tagName");
|
|
367
402
|
var peg$currPos = 0;
|
|
368
403
|
var peg$savedPos = 0;
|
|
369
404
|
var peg$posDetailsCache = [{ line: 1, column: 1 }];
|
|
@@ -493,7 +528,10 @@
|
|
|
493
528
|
if (s0 === peg$FAILED) {
|
|
494
529
|
s0 = peg$parseselectElement();
|
|
495
530
|
if (s0 === peg$FAILED) {
|
|
496
|
-
s0 = peg$
|
|
531
|
+
s0 = peg$parsetagElement();
|
|
532
|
+
if (s0 === peg$FAILED) {
|
|
533
|
+
s0 = peg$parsepoundElement();
|
|
534
|
+
}
|
|
497
535
|
}
|
|
498
536
|
}
|
|
499
537
|
}
|
|
@@ -565,11 +603,104 @@
|
|
|
565
603
|
s0 = s1;
|
|
566
604
|
return s0;
|
|
567
605
|
}
|
|
568
|
-
function peg$
|
|
606
|
+
function peg$parsetagElement() {
|
|
569
607
|
var s0, s1, s2, s3, s4, s5;
|
|
570
608
|
peg$silentFails++;
|
|
571
609
|
s0 = peg$currPos;
|
|
572
|
-
|
|
610
|
+
s1 = peg$currPos;
|
|
611
|
+
if (input.charCodeAt(peg$currPos) === 60) {
|
|
612
|
+
s2 = peg$c6;
|
|
613
|
+
peg$currPos++;
|
|
614
|
+
}
|
|
615
|
+
else {
|
|
616
|
+
s2 = peg$FAILED;
|
|
617
|
+
if (peg$silentFails === 0) {
|
|
618
|
+
peg$fail(peg$c7);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
if (s2 !== peg$FAILED) {
|
|
622
|
+
s3 = peg$parsevalidTag();
|
|
623
|
+
if (s3 !== peg$FAILED) {
|
|
624
|
+
s4 = peg$parse_();
|
|
625
|
+
if (s4 !== peg$FAILED) {
|
|
626
|
+
if (input.substr(peg$currPos, 2) === peg$c8) {
|
|
627
|
+
s5 = peg$c8;
|
|
628
|
+
peg$currPos += 2;
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
s5 = peg$FAILED;
|
|
632
|
+
if (peg$silentFails === 0) {
|
|
633
|
+
peg$fail(peg$c9);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
if (s5 !== peg$FAILED) {
|
|
637
|
+
s2 = [s2, s3, s4, s5];
|
|
638
|
+
s1 = s2;
|
|
639
|
+
}
|
|
640
|
+
else {
|
|
641
|
+
peg$currPos = s1;
|
|
642
|
+
s1 = peg$FAILED;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
else {
|
|
646
|
+
peg$currPos = s1;
|
|
647
|
+
s1 = peg$FAILED;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
peg$currPos = s1;
|
|
652
|
+
s1 = peg$FAILED;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
else {
|
|
656
|
+
peg$currPos = s1;
|
|
657
|
+
s1 = peg$FAILED;
|
|
658
|
+
}
|
|
659
|
+
if (s1 !== peg$FAILED) {
|
|
660
|
+
peg$savedPos = s0;
|
|
661
|
+
s1 = peg$c10(s1);
|
|
662
|
+
}
|
|
663
|
+
s0 = s1;
|
|
664
|
+
if (s0 === peg$FAILED) {
|
|
665
|
+
s0 = peg$currPos;
|
|
666
|
+
s1 = peg$parseopeningTag();
|
|
667
|
+
if (s1 !== peg$FAILED) {
|
|
668
|
+
s2 = peg$parsemessage();
|
|
669
|
+
if (s2 !== peg$FAILED) {
|
|
670
|
+
s3 = peg$parseclosingTag();
|
|
671
|
+
if (s3 !== peg$FAILED) {
|
|
672
|
+
peg$savedPos = s0;
|
|
673
|
+
s1 = peg$c11(s1, s2, s3);
|
|
674
|
+
s0 = s1;
|
|
675
|
+
}
|
|
676
|
+
else {
|
|
677
|
+
peg$currPos = s0;
|
|
678
|
+
s0 = peg$FAILED;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
else {
|
|
682
|
+
peg$currPos = s0;
|
|
683
|
+
s0 = peg$FAILED;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
else {
|
|
687
|
+
peg$currPos = s0;
|
|
688
|
+
s0 = peg$FAILED;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
peg$silentFails--;
|
|
692
|
+
if (s0 === peg$FAILED) {
|
|
693
|
+
s1 = peg$FAILED;
|
|
694
|
+
if (peg$silentFails === 0) {
|
|
695
|
+
peg$fail(peg$c5);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
return s0;
|
|
699
|
+
}
|
|
700
|
+
function peg$parseopeningTag() {
|
|
701
|
+
var s0, s1, s2, s3, s4, s5;
|
|
702
|
+
s0 = peg$currPos;
|
|
703
|
+
if (input.charCodeAt(peg$currPos) === 60) {
|
|
573
704
|
s1 = peg$c6;
|
|
574
705
|
peg$currPos++;
|
|
575
706
|
}
|
|
@@ -579,6 +710,157 @@
|
|
|
579
710
|
peg$fail(peg$c7);
|
|
580
711
|
}
|
|
581
712
|
}
|
|
713
|
+
if (s1 !== peg$FAILED) {
|
|
714
|
+
peg$savedPos = peg$currPos;
|
|
715
|
+
s2 = peg$c12();
|
|
716
|
+
if (s2) {
|
|
717
|
+
s2 = undefined;
|
|
718
|
+
}
|
|
719
|
+
else {
|
|
720
|
+
s2 = peg$FAILED;
|
|
721
|
+
}
|
|
722
|
+
if (s2 !== peg$FAILED) {
|
|
723
|
+
s3 = peg$parsevalidTag();
|
|
724
|
+
if (s3 !== peg$FAILED) {
|
|
725
|
+
if (input.charCodeAt(peg$currPos) === 62) {
|
|
726
|
+
s4 = peg$c13;
|
|
727
|
+
peg$currPos++;
|
|
728
|
+
}
|
|
729
|
+
else {
|
|
730
|
+
s4 = peg$FAILED;
|
|
731
|
+
if (peg$silentFails === 0) {
|
|
732
|
+
peg$fail(peg$c14);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
if (s4 !== peg$FAILED) {
|
|
736
|
+
peg$savedPos = peg$currPos;
|
|
737
|
+
s5 = peg$c15();
|
|
738
|
+
if (s5) {
|
|
739
|
+
s5 = undefined;
|
|
740
|
+
}
|
|
741
|
+
else {
|
|
742
|
+
s5 = peg$FAILED;
|
|
743
|
+
}
|
|
744
|
+
if (s5 !== peg$FAILED) {
|
|
745
|
+
peg$savedPos = s0;
|
|
746
|
+
s1 = peg$c16(s3);
|
|
747
|
+
s0 = s1;
|
|
748
|
+
}
|
|
749
|
+
else {
|
|
750
|
+
peg$currPos = s0;
|
|
751
|
+
s0 = peg$FAILED;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
else {
|
|
755
|
+
peg$currPos = s0;
|
|
756
|
+
s0 = peg$FAILED;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
else {
|
|
760
|
+
peg$currPos = s0;
|
|
761
|
+
s0 = peg$FAILED;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
else {
|
|
765
|
+
peg$currPos = s0;
|
|
766
|
+
s0 = peg$FAILED;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
else {
|
|
770
|
+
peg$currPos = s0;
|
|
771
|
+
s0 = peg$FAILED;
|
|
772
|
+
}
|
|
773
|
+
return s0;
|
|
774
|
+
}
|
|
775
|
+
function peg$parseclosingTag() {
|
|
776
|
+
var s0, s1, s2, s3, s4, s5;
|
|
777
|
+
s0 = peg$currPos;
|
|
778
|
+
if (input.substr(peg$currPos, 2) === peg$c17) {
|
|
779
|
+
s1 = peg$c17;
|
|
780
|
+
peg$currPos += 2;
|
|
781
|
+
}
|
|
782
|
+
else {
|
|
783
|
+
s1 = peg$FAILED;
|
|
784
|
+
if (peg$silentFails === 0) {
|
|
785
|
+
peg$fail(peg$c18);
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
if (s1 !== peg$FAILED) {
|
|
789
|
+
peg$savedPos = peg$currPos;
|
|
790
|
+
s2 = peg$c19();
|
|
791
|
+
if (s2) {
|
|
792
|
+
s2 = undefined;
|
|
793
|
+
}
|
|
794
|
+
else {
|
|
795
|
+
s2 = peg$FAILED;
|
|
796
|
+
}
|
|
797
|
+
if (s2 !== peg$FAILED) {
|
|
798
|
+
s3 = peg$parsevalidTag();
|
|
799
|
+
if (s3 !== peg$FAILED) {
|
|
800
|
+
if (input.charCodeAt(peg$currPos) === 62) {
|
|
801
|
+
s4 = peg$c13;
|
|
802
|
+
peg$currPos++;
|
|
803
|
+
}
|
|
804
|
+
else {
|
|
805
|
+
s4 = peg$FAILED;
|
|
806
|
+
if (peg$silentFails === 0) {
|
|
807
|
+
peg$fail(peg$c14);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
if (s4 !== peg$FAILED) {
|
|
811
|
+
peg$savedPos = peg$currPos;
|
|
812
|
+
s5 = peg$c15();
|
|
813
|
+
if (s5) {
|
|
814
|
+
s5 = undefined;
|
|
815
|
+
}
|
|
816
|
+
else {
|
|
817
|
+
s5 = peg$FAILED;
|
|
818
|
+
}
|
|
819
|
+
if (s5 !== peg$FAILED) {
|
|
820
|
+
peg$savedPos = s0;
|
|
821
|
+
s1 = peg$c16(s3);
|
|
822
|
+
s0 = s1;
|
|
823
|
+
}
|
|
824
|
+
else {
|
|
825
|
+
peg$currPos = s0;
|
|
826
|
+
s0 = peg$FAILED;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
else {
|
|
830
|
+
peg$currPos = s0;
|
|
831
|
+
s0 = peg$FAILED;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
else {
|
|
835
|
+
peg$currPos = s0;
|
|
836
|
+
s0 = peg$FAILED;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
else {
|
|
840
|
+
peg$currPos = s0;
|
|
841
|
+
s0 = peg$FAILED;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
else {
|
|
845
|
+
peg$currPos = s0;
|
|
846
|
+
s0 = peg$FAILED;
|
|
847
|
+
}
|
|
848
|
+
return s0;
|
|
849
|
+
}
|
|
850
|
+
function peg$parseargumentElement() {
|
|
851
|
+
var s0, s1, s2, s3, s4, s5;
|
|
852
|
+
peg$silentFails++;
|
|
853
|
+
s0 = peg$currPos;
|
|
854
|
+
if (input.charCodeAt(peg$currPos) === 123) {
|
|
855
|
+
s1 = peg$c21;
|
|
856
|
+
peg$currPos++;
|
|
857
|
+
}
|
|
858
|
+
else {
|
|
859
|
+
s1 = peg$FAILED;
|
|
860
|
+
if (peg$silentFails === 0) {
|
|
861
|
+
peg$fail(peg$c22);
|
|
862
|
+
}
|
|
863
|
+
}
|
|
582
864
|
if (s1 !== peg$FAILED) {
|
|
583
865
|
s2 = peg$parse_();
|
|
584
866
|
if (s2 !== peg$FAILED) {
|
|
@@ -587,18 +869,18 @@
|
|
|
587
869
|
s4 = peg$parse_();
|
|
588
870
|
if (s4 !== peg$FAILED) {
|
|
589
871
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
590
|
-
s5 = peg$
|
|
872
|
+
s5 = peg$c23;
|
|
591
873
|
peg$currPos++;
|
|
592
874
|
}
|
|
593
875
|
else {
|
|
594
876
|
s5 = peg$FAILED;
|
|
595
877
|
if (peg$silentFails === 0) {
|
|
596
|
-
peg$fail(peg$
|
|
878
|
+
peg$fail(peg$c24);
|
|
597
879
|
}
|
|
598
880
|
}
|
|
599
881
|
if (s5 !== peg$FAILED) {
|
|
600
882
|
peg$savedPos = s0;
|
|
601
|
-
s1 = peg$
|
|
883
|
+
s1 = peg$c25(s3);
|
|
602
884
|
s0 = s1;
|
|
603
885
|
}
|
|
604
886
|
else {
|
|
@@ -629,7 +911,7 @@
|
|
|
629
911
|
if (s0 === peg$FAILED) {
|
|
630
912
|
s1 = peg$FAILED;
|
|
631
913
|
if (peg$silentFails === 0) {
|
|
632
|
-
peg$fail(peg$
|
|
914
|
+
peg$fail(peg$c20);
|
|
633
915
|
}
|
|
634
916
|
}
|
|
635
917
|
return s0;
|
|
@@ -644,14 +926,14 @@
|
|
|
644
926
|
peg$silentFails++;
|
|
645
927
|
s4 = peg$parsewhiteSpace();
|
|
646
928
|
if (s4 === peg$FAILED) {
|
|
647
|
-
if (peg$
|
|
929
|
+
if (peg$c27.test(input.charAt(peg$currPos))) {
|
|
648
930
|
s4 = input.charAt(peg$currPos);
|
|
649
931
|
peg$currPos++;
|
|
650
932
|
}
|
|
651
933
|
else {
|
|
652
934
|
s4 = peg$FAILED;
|
|
653
935
|
if (peg$silentFails === 0) {
|
|
654
|
-
peg$fail(peg$
|
|
936
|
+
peg$fail(peg$c28);
|
|
655
937
|
}
|
|
656
938
|
}
|
|
657
939
|
}
|
|
@@ -671,7 +953,7 @@
|
|
|
671
953
|
else {
|
|
672
954
|
s4 = peg$FAILED;
|
|
673
955
|
if (peg$silentFails === 0) {
|
|
674
|
-
peg$fail(peg$
|
|
956
|
+
peg$fail(peg$c29);
|
|
675
957
|
}
|
|
676
958
|
}
|
|
677
959
|
if (s4 !== peg$FAILED) {
|
|
@@ -695,14 +977,14 @@
|
|
|
695
977
|
peg$silentFails++;
|
|
696
978
|
s4 = peg$parsewhiteSpace();
|
|
697
979
|
if (s4 === peg$FAILED) {
|
|
698
|
-
if (peg$
|
|
980
|
+
if (peg$c27.test(input.charAt(peg$currPos))) {
|
|
699
981
|
s4 = input.charAt(peg$currPos);
|
|
700
982
|
peg$currPos++;
|
|
701
983
|
}
|
|
702
984
|
else {
|
|
703
985
|
s4 = peg$FAILED;
|
|
704
986
|
if (peg$silentFails === 0) {
|
|
705
|
-
peg$fail(peg$
|
|
987
|
+
peg$fail(peg$c28);
|
|
706
988
|
}
|
|
707
989
|
}
|
|
708
990
|
}
|
|
@@ -722,7 +1004,7 @@
|
|
|
722
1004
|
else {
|
|
723
1005
|
s4 = peg$FAILED;
|
|
724
1006
|
if (peg$silentFails === 0) {
|
|
725
|
-
peg$fail(peg$
|
|
1007
|
+
peg$fail(peg$c29);
|
|
726
1008
|
}
|
|
727
1009
|
}
|
|
728
1010
|
if (s4 !== peg$FAILED) {
|
|
@@ -753,7 +1035,7 @@
|
|
|
753
1035
|
if (s0 === peg$FAILED) {
|
|
754
1036
|
s1 = peg$FAILED;
|
|
755
1037
|
if (peg$silentFails === 0) {
|
|
756
|
-
peg$fail(peg$
|
|
1038
|
+
peg$fail(peg$c26);
|
|
757
1039
|
}
|
|
758
1040
|
}
|
|
759
1041
|
return s0;
|
|
@@ -763,20 +1045,20 @@
|
|
|
763
1045
|
peg$silentFails++;
|
|
764
1046
|
s0 = peg$currPos;
|
|
765
1047
|
if (input.charCodeAt(peg$currPos) === 47) {
|
|
766
|
-
s1 = peg$
|
|
1048
|
+
s1 = peg$c31;
|
|
767
1049
|
peg$currPos++;
|
|
768
1050
|
}
|
|
769
1051
|
else {
|
|
770
1052
|
s1 = peg$FAILED;
|
|
771
1053
|
if (peg$silentFails === 0) {
|
|
772
|
-
peg$fail(peg$
|
|
1054
|
+
peg$fail(peg$c32);
|
|
773
1055
|
}
|
|
774
1056
|
}
|
|
775
1057
|
if (s1 !== peg$FAILED) {
|
|
776
1058
|
s2 = peg$parsenumberSkeletonId();
|
|
777
1059
|
if (s2 !== peg$FAILED) {
|
|
778
1060
|
peg$savedPos = s0;
|
|
779
|
-
s1 = peg$
|
|
1061
|
+
s1 = peg$c33(s2);
|
|
780
1062
|
s0 = s1;
|
|
781
1063
|
}
|
|
782
1064
|
else {
|
|
@@ -792,7 +1074,7 @@
|
|
|
792
1074
|
if (s0 === peg$FAILED) {
|
|
793
1075
|
s1 = peg$FAILED;
|
|
794
1076
|
if (peg$silentFails === 0) {
|
|
795
|
-
peg$fail(peg$
|
|
1077
|
+
peg$fail(peg$c30);
|
|
796
1078
|
}
|
|
797
1079
|
}
|
|
798
1080
|
return s0;
|
|
@@ -813,7 +1095,7 @@
|
|
|
813
1095
|
}
|
|
814
1096
|
if (s3 !== peg$FAILED) {
|
|
815
1097
|
peg$savedPos = s0;
|
|
816
|
-
s1 = peg$
|
|
1098
|
+
s1 = peg$c35(s2, s3);
|
|
817
1099
|
s0 = s1;
|
|
818
1100
|
}
|
|
819
1101
|
else {
|
|
@@ -834,7 +1116,7 @@
|
|
|
834
1116
|
if (s0 === peg$FAILED) {
|
|
835
1117
|
s1 = peg$FAILED;
|
|
836
1118
|
if (peg$silentFails === 0) {
|
|
837
|
-
peg$fail(peg$
|
|
1119
|
+
peg$fail(peg$c34);
|
|
838
1120
|
}
|
|
839
1121
|
}
|
|
840
1122
|
return s0;
|
|
@@ -855,7 +1137,7 @@
|
|
|
855
1137
|
}
|
|
856
1138
|
if (s1 !== peg$FAILED) {
|
|
857
1139
|
peg$savedPos = s0;
|
|
858
|
-
s1 = peg$
|
|
1140
|
+
s1 = peg$c36(s1);
|
|
859
1141
|
}
|
|
860
1142
|
s0 = s1;
|
|
861
1143
|
return s0;
|
|
@@ -863,21 +1145,21 @@
|
|
|
863
1145
|
function peg$parsenumberArgStyle() {
|
|
864
1146
|
var s0, s1, s2;
|
|
865
1147
|
s0 = peg$currPos;
|
|
866
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
867
|
-
s1 = peg$
|
|
1148
|
+
if (input.substr(peg$currPos, 2) === peg$c37) {
|
|
1149
|
+
s1 = peg$c37;
|
|
868
1150
|
peg$currPos += 2;
|
|
869
1151
|
}
|
|
870
1152
|
else {
|
|
871
1153
|
s1 = peg$FAILED;
|
|
872
1154
|
if (peg$silentFails === 0) {
|
|
873
|
-
peg$fail(peg$
|
|
1155
|
+
peg$fail(peg$c38);
|
|
874
1156
|
}
|
|
875
1157
|
}
|
|
876
1158
|
if (s1 !== peg$FAILED) {
|
|
877
1159
|
s2 = peg$parsenumberSkeleton();
|
|
878
1160
|
if (s2 !== peg$FAILED) {
|
|
879
1161
|
peg$savedPos = s0;
|
|
880
|
-
s1 = peg$
|
|
1162
|
+
s1 = peg$c39(s2);
|
|
881
1163
|
s0 = s1;
|
|
882
1164
|
}
|
|
883
1165
|
else {
|
|
@@ -892,7 +1174,7 @@
|
|
|
892
1174
|
if (s0 === peg$FAILED) {
|
|
893
1175
|
s0 = peg$currPos;
|
|
894
1176
|
peg$savedPos = peg$currPos;
|
|
895
|
-
s1 = peg$
|
|
1177
|
+
s1 = peg$c40();
|
|
896
1178
|
if (s1) {
|
|
897
1179
|
s1 = undefined;
|
|
898
1180
|
}
|
|
@@ -903,7 +1185,7 @@
|
|
|
903
1185
|
s2 = peg$parsemessageText();
|
|
904
1186
|
if (s2 !== peg$FAILED) {
|
|
905
1187
|
peg$savedPos = s0;
|
|
906
|
-
s1 = peg$
|
|
1188
|
+
s1 = peg$c41(s2);
|
|
907
1189
|
s0 = s1;
|
|
908
1190
|
}
|
|
909
1191
|
else {
|
|
@@ -922,13 +1204,13 @@
|
|
|
922
1204
|
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;
|
|
923
1205
|
s0 = peg$currPos;
|
|
924
1206
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
925
|
-
s1 = peg$
|
|
1207
|
+
s1 = peg$c21;
|
|
926
1208
|
peg$currPos++;
|
|
927
1209
|
}
|
|
928
1210
|
else {
|
|
929
1211
|
s1 = peg$FAILED;
|
|
930
1212
|
if (peg$silentFails === 0) {
|
|
931
|
-
peg$fail(peg$
|
|
1213
|
+
peg$fail(peg$c22);
|
|
932
1214
|
}
|
|
933
1215
|
}
|
|
934
1216
|
if (s1 !== peg$FAILED) {
|
|
@@ -939,26 +1221,26 @@
|
|
|
939
1221
|
s4 = peg$parse_();
|
|
940
1222
|
if (s4 !== peg$FAILED) {
|
|
941
1223
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
942
|
-
s5 = peg$
|
|
1224
|
+
s5 = peg$c42;
|
|
943
1225
|
peg$currPos++;
|
|
944
1226
|
}
|
|
945
1227
|
else {
|
|
946
1228
|
s5 = peg$FAILED;
|
|
947
1229
|
if (peg$silentFails === 0) {
|
|
948
|
-
peg$fail(peg$
|
|
1230
|
+
peg$fail(peg$c43);
|
|
949
1231
|
}
|
|
950
1232
|
}
|
|
951
1233
|
if (s5 !== peg$FAILED) {
|
|
952
1234
|
s6 = peg$parse_();
|
|
953
1235
|
if (s6 !== peg$FAILED) {
|
|
954
|
-
if (input.substr(peg$currPos, 6) === peg$
|
|
955
|
-
s7 = peg$
|
|
1236
|
+
if (input.substr(peg$currPos, 6) === peg$c44) {
|
|
1237
|
+
s7 = peg$c44;
|
|
956
1238
|
peg$currPos += 6;
|
|
957
1239
|
}
|
|
958
1240
|
else {
|
|
959
1241
|
s7 = peg$FAILED;
|
|
960
1242
|
if (peg$silentFails === 0) {
|
|
961
|
-
peg$fail(peg$
|
|
1243
|
+
peg$fail(peg$c45);
|
|
962
1244
|
}
|
|
963
1245
|
}
|
|
964
1246
|
if (s7 !== peg$FAILED) {
|
|
@@ -966,13 +1248,13 @@
|
|
|
966
1248
|
if (s8 !== peg$FAILED) {
|
|
967
1249
|
s9 = peg$currPos;
|
|
968
1250
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
969
|
-
s10 = peg$
|
|
1251
|
+
s10 = peg$c42;
|
|
970
1252
|
peg$currPos++;
|
|
971
1253
|
}
|
|
972
1254
|
else {
|
|
973
1255
|
s10 = peg$FAILED;
|
|
974
1256
|
if (peg$silentFails === 0) {
|
|
975
|
-
peg$fail(peg$
|
|
1257
|
+
peg$fail(peg$c43);
|
|
976
1258
|
}
|
|
977
1259
|
}
|
|
978
1260
|
if (s10 !== peg$FAILED) {
|
|
@@ -1004,18 +1286,18 @@
|
|
|
1004
1286
|
s10 = peg$parse_();
|
|
1005
1287
|
if (s10 !== peg$FAILED) {
|
|
1006
1288
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
1007
|
-
s11 = peg$
|
|
1289
|
+
s11 = peg$c23;
|
|
1008
1290
|
peg$currPos++;
|
|
1009
1291
|
}
|
|
1010
1292
|
else {
|
|
1011
1293
|
s11 = peg$FAILED;
|
|
1012
1294
|
if (peg$silentFails === 0) {
|
|
1013
|
-
peg$fail(peg$
|
|
1295
|
+
peg$fail(peg$c24);
|
|
1014
1296
|
}
|
|
1015
1297
|
}
|
|
1016
1298
|
if (s11 !== peg$FAILED) {
|
|
1017
1299
|
peg$savedPos = s0;
|
|
1018
|
-
s1 = peg$
|
|
1300
|
+
s1 = peg$c46(s3, s7, s9);
|
|
1019
1301
|
s0 = s1;
|
|
1020
1302
|
}
|
|
1021
1303
|
else {
|
|
@@ -1078,27 +1360,27 @@
|
|
|
1078
1360
|
var s0, s1, s2, s3;
|
|
1079
1361
|
s0 = peg$currPos;
|
|
1080
1362
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
1081
|
-
s1 = peg$
|
|
1363
|
+
s1 = peg$c47;
|
|
1082
1364
|
peg$currPos++;
|
|
1083
1365
|
}
|
|
1084
1366
|
else {
|
|
1085
1367
|
s1 = peg$FAILED;
|
|
1086
1368
|
if (peg$silentFails === 0) {
|
|
1087
|
-
peg$fail(peg$
|
|
1369
|
+
peg$fail(peg$c48);
|
|
1088
1370
|
}
|
|
1089
1371
|
}
|
|
1090
1372
|
if (s1 !== peg$FAILED) {
|
|
1091
1373
|
s2 = [];
|
|
1092
1374
|
s3 = peg$parsedoubleApostrophes();
|
|
1093
1375
|
if (s3 === peg$FAILED) {
|
|
1094
|
-
if (peg$
|
|
1376
|
+
if (peg$c49.test(input.charAt(peg$currPos))) {
|
|
1095
1377
|
s3 = input.charAt(peg$currPos);
|
|
1096
1378
|
peg$currPos++;
|
|
1097
1379
|
}
|
|
1098
1380
|
else {
|
|
1099
1381
|
s3 = peg$FAILED;
|
|
1100
1382
|
if (peg$silentFails === 0) {
|
|
1101
|
-
peg$fail(peg$
|
|
1383
|
+
peg$fail(peg$c50);
|
|
1102
1384
|
}
|
|
1103
1385
|
}
|
|
1104
1386
|
}
|
|
@@ -1107,14 +1389,14 @@
|
|
|
1107
1389
|
s2.push(s3);
|
|
1108
1390
|
s3 = peg$parsedoubleApostrophes();
|
|
1109
1391
|
if (s3 === peg$FAILED) {
|
|
1110
|
-
if (peg$
|
|
1392
|
+
if (peg$c49.test(input.charAt(peg$currPos))) {
|
|
1111
1393
|
s3 = input.charAt(peg$currPos);
|
|
1112
1394
|
peg$currPos++;
|
|
1113
1395
|
}
|
|
1114
1396
|
else {
|
|
1115
1397
|
s3 = peg$FAILED;
|
|
1116
1398
|
if (peg$silentFails === 0) {
|
|
1117
|
-
peg$fail(peg$
|
|
1399
|
+
peg$fail(peg$c50);
|
|
1118
1400
|
}
|
|
1119
1401
|
}
|
|
1120
1402
|
}
|
|
@@ -1125,13 +1407,13 @@
|
|
|
1125
1407
|
}
|
|
1126
1408
|
if (s2 !== peg$FAILED) {
|
|
1127
1409
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
1128
|
-
s3 = peg$
|
|
1410
|
+
s3 = peg$c47;
|
|
1129
1411
|
peg$currPos++;
|
|
1130
1412
|
}
|
|
1131
1413
|
else {
|
|
1132
1414
|
s3 = peg$FAILED;
|
|
1133
1415
|
if (peg$silentFails === 0) {
|
|
1134
|
-
peg$fail(peg$
|
|
1416
|
+
peg$fail(peg$c48);
|
|
1135
1417
|
}
|
|
1136
1418
|
}
|
|
1137
1419
|
if (s3 !== peg$FAILED) {
|
|
@@ -1156,14 +1438,14 @@
|
|
|
1156
1438
|
s0 = [];
|
|
1157
1439
|
s1 = peg$parsedoubleApostrophes();
|
|
1158
1440
|
if (s1 === peg$FAILED) {
|
|
1159
|
-
if (peg$
|
|
1441
|
+
if (peg$c51.test(input.charAt(peg$currPos))) {
|
|
1160
1442
|
s1 = input.charAt(peg$currPos);
|
|
1161
1443
|
peg$currPos++;
|
|
1162
1444
|
}
|
|
1163
1445
|
else {
|
|
1164
1446
|
s1 = peg$FAILED;
|
|
1165
1447
|
if (peg$silentFails === 0) {
|
|
1166
|
-
peg$fail(peg$
|
|
1448
|
+
peg$fail(peg$c52);
|
|
1167
1449
|
}
|
|
1168
1450
|
}
|
|
1169
1451
|
}
|
|
@@ -1172,14 +1454,14 @@
|
|
|
1172
1454
|
s0.push(s1);
|
|
1173
1455
|
s1 = peg$parsedoubleApostrophes();
|
|
1174
1456
|
if (s1 === peg$FAILED) {
|
|
1175
|
-
if (peg$
|
|
1457
|
+
if (peg$c51.test(input.charAt(peg$currPos))) {
|
|
1176
1458
|
s1 = input.charAt(peg$currPos);
|
|
1177
1459
|
peg$currPos++;
|
|
1178
1460
|
}
|
|
1179
1461
|
else {
|
|
1180
1462
|
s1 = peg$FAILED;
|
|
1181
1463
|
if (peg$silentFails === 0) {
|
|
1182
|
-
peg$fail(peg$
|
|
1464
|
+
peg$fail(peg$c52);
|
|
1183
1465
|
}
|
|
1184
1466
|
}
|
|
1185
1467
|
}
|
|
@@ -1194,27 +1476,27 @@
|
|
|
1194
1476
|
function peg$parsedateTimeSkeletonPattern() {
|
|
1195
1477
|
var s0, s1;
|
|
1196
1478
|
s0 = [];
|
|
1197
|
-
if (peg$
|
|
1479
|
+
if (peg$c53.test(input.charAt(peg$currPos))) {
|
|
1198
1480
|
s1 = input.charAt(peg$currPos);
|
|
1199
1481
|
peg$currPos++;
|
|
1200
1482
|
}
|
|
1201
1483
|
else {
|
|
1202
1484
|
s1 = peg$FAILED;
|
|
1203
1485
|
if (peg$silentFails === 0) {
|
|
1204
|
-
peg$fail(peg$
|
|
1486
|
+
peg$fail(peg$c54);
|
|
1205
1487
|
}
|
|
1206
1488
|
}
|
|
1207
1489
|
if (s1 !== peg$FAILED) {
|
|
1208
1490
|
while (s1 !== peg$FAILED) {
|
|
1209
1491
|
s0.push(s1);
|
|
1210
|
-
if (peg$
|
|
1492
|
+
if (peg$c53.test(input.charAt(peg$currPos))) {
|
|
1211
1493
|
s1 = input.charAt(peg$currPos);
|
|
1212
1494
|
peg$currPos++;
|
|
1213
1495
|
}
|
|
1214
1496
|
else {
|
|
1215
1497
|
s1 = peg$FAILED;
|
|
1216
1498
|
if (peg$silentFails === 0) {
|
|
1217
|
-
peg$fail(peg$
|
|
1499
|
+
peg$fail(peg$c54);
|
|
1218
1500
|
}
|
|
1219
1501
|
}
|
|
1220
1502
|
}
|
|
@@ -1253,7 +1535,7 @@
|
|
|
1253
1535
|
}
|
|
1254
1536
|
if (s1 !== peg$FAILED) {
|
|
1255
1537
|
peg$savedPos = s0;
|
|
1256
|
-
s1 = peg$
|
|
1538
|
+
s1 = peg$c55(s1);
|
|
1257
1539
|
}
|
|
1258
1540
|
s0 = s1;
|
|
1259
1541
|
return s0;
|
|
@@ -1261,21 +1543,21 @@
|
|
|
1261
1543
|
function peg$parsedateOrTimeArgStyle() {
|
|
1262
1544
|
var s0, s1, s2;
|
|
1263
1545
|
s0 = peg$currPos;
|
|
1264
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
1265
|
-
s1 = peg$
|
|
1546
|
+
if (input.substr(peg$currPos, 2) === peg$c37) {
|
|
1547
|
+
s1 = peg$c37;
|
|
1266
1548
|
peg$currPos += 2;
|
|
1267
1549
|
}
|
|
1268
1550
|
else {
|
|
1269
1551
|
s1 = peg$FAILED;
|
|
1270
1552
|
if (peg$silentFails === 0) {
|
|
1271
|
-
peg$fail(peg$
|
|
1553
|
+
peg$fail(peg$c38);
|
|
1272
1554
|
}
|
|
1273
1555
|
}
|
|
1274
1556
|
if (s1 !== peg$FAILED) {
|
|
1275
1557
|
s2 = peg$parsedateTimeSkeleton();
|
|
1276
1558
|
if (s2 !== peg$FAILED) {
|
|
1277
1559
|
peg$savedPos = s0;
|
|
1278
|
-
s1 = peg$
|
|
1560
|
+
s1 = peg$c39(s2);
|
|
1279
1561
|
s0 = s1;
|
|
1280
1562
|
}
|
|
1281
1563
|
else {
|
|
@@ -1290,7 +1572,7 @@
|
|
|
1290
1572
|
if (s0 === peg$FAILED) {
|
|
1291
1573
|
s0 = peg$currPos;
|
|
1292
1574
|
peg$savedPos = peg$currPos;
|
|
1293
|
-
s1 = peg$
|
|
1575
|
+
s1 = peg$c56();
|
|
1294
1576
|
if (s1) {
|
|
1295
1577
|
s1 = undefined;
|
|
1296
1578
|
}
|
|
@@ -1301,7 +1583,7 @@
|
|
|
1301
1583
|
s2 = peg$parsemessageText();
|
|
1302
1584
|
if (s2 !== peg$FAILED) {
|
|
1303
1585
|
peg$savedPos = s0;
|
|
1304
|
-
s1 = peg$
|
|
1586
|
+
s1 = peg$c41(s2);
|
|
1305
1587
|
s0 = s1;
|
|
1306
1588
|
}
|
|
1307
1589
|
else {
|
|
@@ -1320,13 +1602,13 @@
|
|
|
1320
1602
|
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;
|
|
1321
1603
|
s0 = peg$currPos;
|
|
1322
1604
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
1323
|
-
s1 = peg$
|
|
1605
|
+
s1 = peg$c21;
|
|
1324
1606
|
peg$currPos++;
|
|
1325
1607
|
}
|
|
1326
1608
|
else {
|
|
1327
1609
|
s1 = peg$FAILED;
|
|
1328
1610
|
if (peg$silentFails === 0) {
|
|
1329
|
-
peg$fail(peg$
|
|
1611
|
+
peg$fail(peg$c22);
|
|
1330
1612
|
}
|
|
1331
1613
|
}
|
|
1332
1614
|
if (s1 !== peg$FAILED) {
|
|
@@ -1337,37 +1619,37 @@
|
|
|
1337
1619
|
s4 = peg$parse_();
|
|
1338
1620
|
if (s4 !== peg$FAILED) {
|
|
1339
1621
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1340
|
-
s5 = peg$
|
|
1622
|
+
s5 = peg$c42;
|
|
1341
1623
|
peg$currPos++;
|
|
1342
1624
|
}
|
|
1343
1625
|
else {
|
|
1344
1626
|
s5 = peg$FAILED;
|
|
1345
1627
|
if (peg$silentFails === 0) {
|
|
1346
|
-
peg$fail(peg$
|
|
1628
|
+
peg$fail(peg$c43);
|
|
1347
1629
|
}
|
|
1348
1630
|
}
|
|
1349
1631
|
if (s5 !== peg$FAILED) {
|
|
1350
1632
|
s6 = peg$parse_();
|
|
1351
1633
|
if (s6 !== peg$FAILED) {
|
|
1352
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
1353
|
-
s7 = peg$
|
|
1634
|
+
if (input.substr(peg$currPos, 4) === peg$c57) {
|
|
1635
|
+
s7 = peg$c57;
|
|
1354
1636
|
peg$currPos += 4;
|
|
1355
1637
|
}
|
|
1356
1638
|
else {
|
|
1357
1639
|
s7 = peg$FAILED;
|
|
1358
1640
|
if (peg$silentFails === 0) {
|
|
1359
|
-
peg$fail(peg$
|
|
1641
|
+
peg$fail(peg$c58);
|
|
1360
1642
|
}
|
|
1361
1643
|
}
|
|
1362
1644
|
if (s7 === peg$FAILED) {
|
|
1363
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
1364
|
-
s7 = peg$
|
|
1645
|
+
if (input.substr(peg$currPos, 4) === peg$c59) {
|
|
1646
|
+
s7 = peg$c59;
|
|
1365
1647
|
peg$currPos += 4;
|
|
1366
1648
|
}
|
|
1367
1649
|
else {
|
|
1368
1650
|
s7 = peg$FAILED;
|
|
1369
1651
|
if (peg$silentFails === 0) {
|
|
1370
|
-
peg$fail(peg$
|
|
1652
|
+
peg$fail(peg$c60);
|
|
1371
1653
|
}
|
|
1372
1654
|
}
|
|
1373
1655
|
}
|
|
@@ -1376,13 +1658,13 @@
|
|
|
1376
1658
|
if (s8 !== peg$FAILED) {
|
|
1377
1659
|
s9 = peg$currPos;
|
|
1378
1660
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1379
|
-
s10 = peg$
|
|
1661
|
+
s10 = peg$c42;
|
|
1380
1662
|
peg$currPos++;
|
|
1381
1663
|
}
|
|
1382
1664
|
else {
|
|
1383
1665
|
s10 = peg$FAILED;
|
|
1384
1666
|
if (peg$silentFails === 0) {
|
|
1385
|
-
peg$fail(peg$
|
|
1667
|
+
peg$fail(peg$c43);
|
|
1386
1668
|
}
|
|
1387
1669
|
}
|
|
1388
1670
|
if (s10 !== peg$FAILED) {
|
|
@@ -1414,18 +1696,18 @@
|
|
|
1414
1696
|
s10 = peg$parse_();
|
|
1415
1697
|
if (s10 !== peg$FAILED) {
|
|
1416
1698
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
1417
|
-
s11 = peg$
|
|
1699
|
+
s11 = peg$c23;
|
|
1418
1700
|
peg$currPos++;
|
|
1419
1701
|
}
|
|
1420
1702
|
else {
|
|
1421
1703
|
s11 = peg$FAILED;
|
|
1422
1704
|
if (peg$silentFails === 0) {
|
|
1423
|
-
peg$fail(peg$
|
|
1705
|
+
peg$fail(peg$c24);
|
|
1424
1706
|
}
|
|
1425
1707
|
}
|
|
1426
1708
|
if (s11 !== peg$FAILED) {
|
|
1427
1709
|
peg$savedPos = s0;
|
|
1428
|
-
s1 = peg$
|
|
1710
|
+
s1 = peg$c46(s3, s7, s9);
|
|
1429
1711
|
s0 = s1;
|
|
1430
1712
|
}
|
|
1431
1713
|
else {
|
|
@@ -1496,13 +1778,13 @@
|
|
|
1496
1778
|
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15;
|
|
1497
1779
|
s0 = peg$currPos;
|
|
1498
1780
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
1499
|
-
s1 = peg$
|
|
1781
|
+
s1 = peg$c21;
|
|
1500
1782
|
peg$currPos++;
|
|
1501
1783
|
}
|
|
1502
1784
|
else {
|
|
1503
1785
|
s1 = peg$FAILED;
|
|
1504
1786
|
if (peg$silentFails === 0) {
|
|
1505
|
-
peg$fail(peg$
|
|
1787
|
+
peg$fail(peg$c22);
|
|
1506
1788
|
}
|
|
1507
1789
|
}
|
|
1508
1790
|
if (s1 !== peg$FAILED) {
|
|
@@ -1513,37 +1795,37 @@
|
|
|
1513
1795
|
s4 = peg$parse_();
|
|
1514
1796
|
if (s4 !== peg$FAILED) {
|
|
1515
1797
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1516
|
-
s5 = peg$
|
|
1798
|
+
s5 = peg$c42;
|
|
1517
1799
|
peg$currPos++;
|
|
1518
1800
|
}
|
|
1519
1801
|
else {
|
|
1520
1802
|
s5 = peg$FAILED;
|
|
1521
1803
|
if (peg$silentFails === 0) {
|
|
1522
|
-
peg$fail(peg$
|
|
1804
|
+
peg$fail(peg$c43);
|
|
1523
1805
|
}
|
|
1524
1806
|
}
|
|
1525
1807
|
if (s5 !== peg$FAILED) {
|
|
1526
1808
|
s6 = peg$parse_();
|
|
1527
1809
|
if (s6 !== peg$FAILED) {
|
|
1528
|
-
if (input.substr(peg$currPos, 6) === peg$
|
|
1529
|
-
s7 = peg$
|
|
1810
|
+
if (input.substr(peg$currPos, 6) === peg$c61) {
|
|
1811
|
+
s7 = peg$c61;
|
|
1530
1812
|
peg$currPos += 6;
|
|
1531
1813
|
}
|
|
1532
1814
|
else {
|
|
1533
1815
|
s7 = peg$FAILED;
|
|
1534
1816
|
if (peg$silentFails === 0) {
|
|
1535
|
-
peg$fail(peg$
|
|
1817
|
+
peg$fail(peg$c62);
|
|
1536
1818
|
}
|
|
1537
1819
|
}
|
|
1538
1820
|
if (s7 === peg$FAILED) {
|
|
1539
|
-
if (input.substr(peg$currPos, 13) === peg$
|
|
1540
|
-
s7 = peg$
|
|
1821
|
+
if (input.substr(peg$currPos, 13) === peg$c63) {
|
|
1822
|
+
s7 = peg$c63;
|
|
1541
1823
|
peg$currPos += 13;
|
|
1542
1824
|
}
|
|
1543
1825
|
else {
|
|
1544
1826
|
s7 = peg$FAILED;
|
|
1545
1827
|
if (peg$silentFails === 0) {
|
|
1546
|
-
peg$fail(peg$
|
|
1828
|
+
peg$fail(peg$c64);
|
|
1547
1829
|
}
|
|
1548
1830
|
}
|
|
1549
1831
|
}
|
|
@@ -1551,27 +1833,27 @@
|
|
|
1551
1833
|
s8 = peg$parse_();
|
|
1552
1834
|
if (s8 !== peg$FAILED) {
|
|
1553
1835
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1554
|
-
s9 = peg$
|
|
1836
|
+
s9 = peg$c42;
|
|
1555
1837
|
peg$currPos++;
|
|
1556
1838
|
}
|
|
1557
1839
|
else {
|
|
1558
1840
|
s9 = peg$FAILED;
|
|
1559
1841
|
if (peg$silentFails === 0) {
|
|
1560
|
-
peg$fail(peg$
|
|
1842
|
+
peg$fail(peg$c43);
|
|
1561
1843
|
}
|
|
1562
1844
|
}
|
|
1563
1845
|
if (s9 !== peg$FAILED) {
|
|
1564
1846
|
s10 = peg$parse_();
|
|
1565
1847
|
if (s10 !== peg$FAILED) {
|
|
1566
1848
|
s11 = peg$currPos;
|
|
1567
|
-
if (input.substr(peg$currPos, 7) === peg$
|
|
1568
|
-
s12 = peg$
|
|
1849
|
+
if (input.substr(peg$currPos, 7) === peg$c65) {
|
|
1850
|
+
s12 = peg$c65;
|
|
1569
1851
|
peg$currPos += 7;
|
|
1570
1852
|
}
|
|
1571
1853
|
else {
|
|
1572
1854
|
s12 = peg$FAILED;
|
|
1573
1855
|
if (peg$silentFails === 0) {
|
|
1574
|
-
peg$fail(peg$
|
|
1856
|
+
peg$fail(peg$c66);
|
|
1575
1857
|
}
|
|
1576
1858
|
}
|
|
1577
1859
|
if (s12 !== peg$FAILED) {
|
|
@@ -1617,18 +1899,18 @@
|
|
|
1617
1899
|
s14 = peg$parse_();
|
|
1618
1900
|
if (s14 !== peg$FAILED) {
|
|
1619
1901
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
1620
|
-
s15 = peg$
|
|
1902
|
+
s15 = peg$c23;
|
|
1621
1903
|
peg$currPos++;
|
|
1622
1904
|
}
|
|
1623
1905
|
else {
|
|
1624
1906
|
s15 = peg$FAILED;
|
|
1625
1907
|
if (peg$silentFails === 0) {
|
|
1626
|
-
peg$fail(peg$
|
|
1908
|
+
peg$fail(peg$c24);
|
|
1627
1909
|
}
|
|
1628
1910
|
}
|
|
1629
1911
|
if (s15 !== peg$FAILED) {
|
|
1630
1912
|
peg$savedPos = s0;
|
|
1631
|
-
s1 = peg$
|
|
1913
|
+
s1 = peg$c67(s3, s7, s11, s13);
|
|
1632
1914
|
s0 = s1;
|
|
1633
1915
|
}
|
|
1634
1916
|
else {
|
|
@@ -1711,13 +1993,13 @@
|
|
|
1711
1993
|
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
|
|
1712
1994
|
s0 = peg$currPos;
|
|
1713
1995
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
1714
|
-
s1 = peg$
|
|
1996
|
+
s1 = peg$c21;
|
|
1715
1997
|
peg$currPos++;
|
|
1716
1998
|
}
|
|
1717
1999
|
else {
|
|
1718
2000
|
s1 = peg$FAILED;
|
|
1719
2001
|
if (peg$silentFails === 0) {
|
|
1720
|
-
peg$fail(peg$
|
|
2002
|
+
peg$fail(peg$c22);
|
|
1721
2003
|
}
|
|
1722
2004
|
}
|
|
1723
2005
|
if (s1 !== peg$FAILED) {
|
|
@@ -1728,39 +2010,39 @@
|
|
|
1728
2010
|
s4 = peg$parse_();
|
|
1729
2011
|
if (s4 !== peg$FAILED) {
|
|
1730
2012
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1731
|
-
s5 = peg$
|
|
2013
|
+
s5 = peg$c42;
|
|
1732
2014
|
peg$currPos++;
|
|
1733
2015
|
}
|
|
1734
2016
|
else {
|
|
1735
2017
|
s5 = peg$FAILED;
|
|
1736
2018
|
if (peg$silentFails === 0) {
|
|
1737
|
-
peg$fail(peg$
|
|
2019
|
+
peg$fail(peg$c43);
|
|
1738
2020
|
}
|
|
1739
2021
|
}
|
|
1740
2022
|
if (s5 !== peg$FAILED) {
|
|
1741
2023
|
s6 = peg$parse_();
|
|
1742
2024
|
if (s6 !== peg$FAILED) {
|
|
1743
|
-
if (input.substr(peg$currPos, 6) === peg$
|
|
1744
|
-
s7 = peg$
|
|
2025
|
+
if (input.substr(peg$currPos, 6) === peg$c68) {
|
|
2026
|
+
s7 = peg$c68;
|
|
1745
2027
|
peg$currPos += 6;
|
|
1746
2028
|
}
|
|
1747
2029
|
else {
|
|
1748
2030
|
s7 = peg$FAILED;
|
|
1749
2031
|
if (peg$silentFails === 0) {
|
|
1750
|
-
peg$fail(peg$
|
|
2032
|
+
peg$fail(peg$c69);
|
|
1751
2033
|
}
|
|
1752
2034
|
}
|
|
1753
2035
|
if (s7 !== peg$FAILED) {
|
|
1754
2036
|
s8 = peg$parse_();
|
|
1755
2037
|
if (s8 !== peg$FAILED) {
|
|
1756
2038
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1757
|
-
s9 = peg$
|
|
2039
|
+
s9 = peg$c42;
|
|
1758
2040
|
peg$currPos++;
|
|
1759
2041
|
}
|
|
1760
2042
|
else {
|
|
1761
2043
|
s9 = peg$FAILED;
|
|
1762
2044
|
if (peg$silentFails === 0) {
|
|
1763
|
-
peg$fail(peg$
|
|
2045
|
+
peg$fail(peg$c43);
|
|
1764
2046
|
}
|
|
1765
2047
|
}
|
|
1766
2048
|
if (s9 !== peg$FAILED) {
|
|
@@ -1781,18 +2063,18 @@
|
|
|
1781
2063
|
s12 = peg$parse_();
|
|
1782
2064
|
if (s12 !== peg$FAILED) {
|
|
1783
2065
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
1784
|
-
s13 = peg$
|
|
2066
|
+
s13 = peg$c23;
|
|
1785
2067
|
peg$currPos++;
|
|
1786
2068
|
}
|
|
1787
2069
|
else {
|
|
1788
2070
|
s13 = peg$FAILED;
|
|
1789
2071
|
if (peg$silentFails === 0) {
|
|
1790
|
-
peg$fail(peg$
|
|
2072
|
+
peg$fail(peg$c24);
|
|
1791
2073
|
}
|
|
1792
2074
|
}
|
|
1793
2075
|
if (s13 !== peg$FAILED) {
|
|
1794
2076
|
peg$savedPos = s0;
|
|
1795
|
-
s1 = peg$
|
|
2077
|
+
s1 = peg$c70(s3, s11);
|
|
1796
2078
|
s0 = s1;
|
|
1797
2079
|
}
|
|
1798
2080
|
else {
|
|
@@ -1866,13 +2148,13 @@
|
|
|
1866
2148
|
s0 = peg$currPos;
|
|
1867
2149
|
s1 = peg$currPos;
|
|
1868
2150
|
if (input.charCodeAt(peg$currPos) === 61) {
|
|
1869
|
-
s2 = peg$
|
|
2151
|
+
s2 = peg$c71;
|
|
1870
2152
|
peg$currPos++;
|
|
1871
2153
|
}
|
|
1872
2154
|
else {
|
|
1873
2155
|
s2 = peg$FAILED;
|
|
1874
2156
|
if (peg$silentFails === 0) {
|
|
1875
|
-
peg$fail(peg$
|
|
2157
|
+
peg$fail(peg$c72);
|
|
1876
2158
|
}
|
|
1877
2159
|
}
|
|
1878
2160
|
if (s2 !== peg$FAILED) {
|
|
@@ -1911,18 +2193,18 @@
|
|
|
1911
2193
|
s3 = peg$parse_();
|
|
1912
2194
|
if (s3 !== peg$FAILED) {
|
|
1913
2195
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
1914
|
-
s4 = peg$
|
|
2196
|
+
s4 = peg$c21;
|
|
1915
2197
|
peg$currPos++;
|
|
1916
2198
|
}
|
|
1917
2199
|
else {
|
|
1918
2200
|
s4 = peg$FAILED;
|
|
1919
2201
|
if (peg$silentFails === 0) {
|
|
1920
|
-
peg$fail(peg$
|
|
2202
|
+
peg$fail(peg$c22);
|
|
1921
2203
|
}
|
|
1922
2204
|
}
|
|
1923
2205
|
if (s4 !== peg$FAILED) {
|
|
1924
2206
|
peg$savedPos = peg$currPos;
|
|
1925
|
-
s5 = peg$
|
|
2207
|
+
s5 = peg$c73();
|
|
1926
2208
|
if (s5) {
|
|
1927
2209
|
s5 = undefined;
|
|
1928
2210
|
}
|
|
@@ -1933,18 +2215,18 @@
|
|
|
1933
2215
|
s6 = peg$parsemessage();
|
|
1934
2216
|
if (s6 !== peg$FAILED) {
|
|
1935
2217
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
1936
|
-
s7 = peg$
|
|
2218
|
+
s7 = peg$c23;
|
|
1937
2219
|
peg$currPos++;
|
|
1938
2220
|
}
|
|
1939
2221
|
else {
|
|
1940
2222
|
s7 = peg$FAILED;
|
|
1941
2223
|
if (peg$silentFails === 0) {
|
|
1942
|
-
peg$fail(peg$
|
|
2224
|
+
peg$fail(peg$c24);
|
|
1943
2225
|
}
|
|
1944
2226
|
}
|
|
1945
2227
|
if (s7 !== peg$FAILED) {
|
|
1946
2228
|
peg$savedPos = s0;
|
|
1947
|
-
s1 = peg$
|
|
2229
|
+
s1 = peg$c74(s2, s6);
|
|
1948
2230
|
s0 = s1;
|
|
1949
2231
|
}
|
|
1950
2232
|
else {
|
|
@@ -1993,18 +2275,18 @@
|
|
|
1993
2275
|
s3 = peg$parse_();
|
|
1994
2276
|
if (s3 !== peg$FAILED) {
|
|
1995
2277
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
1996
|
-
s4 = peg$
|
|
2278
|
+
s4 = peg$c21;
|
|
1997
2279
|
peg$currPos++;
|
|
1998
2280
|
}
|
|
1999
2281
|
else {
|
|
2000
2282
|
s4 = peg$FAILED;
|
|
2001
2283
|
if (peg$silentFails === 0) {
|
|
2002
|
-
peg$fail(peg$
|
|
2284
|
+
peg$fail(peg$c22);
|
|
2003
2285
|
}
|
|
2004
2286
|
}
|
|
2005
2287
|
if (s4 !== peg$FAILED) {
|
|
2006
2288
|
peg$savedPos = peg$currPos;
|
|
2007
|
-
s5 = peg$
|
|
2289
|
+
s5 = peg$c75();
|
|
2008
2290
|
if (s5) {
|
|
2009
2291
|
s5 = undefined;
|
|
2010
2292
|
}
|
|
@@ -2015,18 +2297,18 @@
|
|
|
2015
2297
|
s6 = peg$parsemessage();
|
|
2016
2298
|
if (s6 !== peg$FAILED) {
|
|
2017
2299
|
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2018
|
-
s7 = peg$
|
|
2300
|
+
s7 = peg$c23;
|
|
2019
2301
|
peg$currPos++;
|
|
2020
2302
|
}
|
|
2021
2303
|
else {
|
|
2022
2304
|
s7 = peg$FAILED;
|
|
2023
2305
|
if (peg$silentFails === 0) {
|
|
2024
|
-
peg$fail(peg$
|
|
2306
|
+
peg$fail(peg$c24);
|
|
2025
2307
|
}
|
|
2026
2308
|
}
|
|
2027
2309
|
if (s7 !== peg$FAILED) {
|
|
2028
2310
|
peg$savedPos = s0;
|
|
2029
|
-
s1 = peg$
|
|
2311
|
+
s1 = peg$c76(s2, s6);
|
|
2030
2312
|
s0 = s1;
|
|
2031
2313
|
}
|
|
2032
2314
|
else {
|
|
@@ -2068,20 +2350,20 @@
|
|
|
2068
2350
|
function peg$parsewhiteSpace() {
|
|
2069
2351
|
var s0;
|
|
2070
2352
|
peg$silentFails++;
|
|
2071
|
-
if (peg$
|
|
2353
|
+
if (peg$c78.test(input.charAt(peg$currPos))) {
|
|
2072
2354
|
s0 = input.charAt(peg$currPos);
|
|
2073
2355
|
peg$currPos++;
|
|
2074
2356
|
}
|
|
2075
2357
|
else {
|
|
2076
2358
|
s0 = peg$FAILED;
|
|
2077
2359
|
if (peg$silentFails === 0) {
|
|
2078
|
-
peg$fail(peg$
|
|
2360
|
+
peg$fail(peg$c79);
|
|
2079
2361
|
}
|
|
2080
2362
|
}
|
|
2081
2363
|
peg$silentFails--;
|
|
2082
2364
|
if (s0 === peg$FAILED) {
|
|
2083
2365
|
if (peg$silentFails === 0) {
|
|
2084
|
-
peg$fail(peg$
|
|
2366
|
+
peg$fail(peg$c77);
|
|
2085
2367
|
}
|
|
2086
2368
|
}
|
|
2087
2369
|
return s0;
|
|
@@ -2089,20 +2371,20 @@
|
|
|
2089
2371
|
function peg$parsepatternSyntax() {
|
|
2090
2372
|
var s0;
|
|
2091
2373
|
peg$silentFails++;
|
|
2092
|
-
if (peg$
|
|
2374
|
+
if (peg$c81.test(input.charAt(peg$currPos))) {
|
|
2093
2375
|
s0 = input.charAt(peg$currPos);
|
|
2094
2376
|
peg$currPos++;
|
|
2095
2377
|
}
|
|
2096
2378
|
else {
|
|
2097
2379
|
s0 = peg$FAILED;
|
|
2098
2380
|
if (peg$silentFails === 0) {
|
|
2099
|
-
peg$fail(peg$
|
|
2381
|
+
peg$fail(peg$c82);
|
|
2100
2382
|
}
|
|
2101
2383
|
}
|
|
2102
2384
|
peg$silentFails--;
|
|
2103
2385
|
if (s0 === peg$FAILED) {
|
|
2104
2386
|
if (peg$silentFails === 0) {
|
|
2105
|
-
peg$fail(peg$
|
|
2387
|
+
peg$fail(peg$c80);
|
|
2106
2388
|
}
|
|
2107
2389
|
}
|
|
2108
2390
|
return s0;
|
|
@@ -2127,7 +2409,7 @@
|
|
|
2127
2409
|
if (s0 === peg$FAILED) {
|
|
2128
2410
|
s1 = peg$FAILED;
|
|
2129
2411
|
if (peg$silentFails === 0) {
|
|
2130
|
-
peg$fail(peg$
|
|
2412
|
+
peg$fail(peg$c83);
|
|
2131
2413
|
}
|
|
2132
2414
|
}
|
|
2133
2415
|
return s0;
|
|
@@ -2137,13 +2419,13 @@
|
|
|
2137
2419
|
peg$silentFails++;
|
|
2138
2420
|
s0 = peg$currPos;
|
|
2139
2421
|
if (input.charCodeAt(peg$currPos) === 45) {
|
|
2140
|
-
s1 = peg$
|
|
2422
|
+
s1 = peg$c85;
|
|
2141
2423
|
peg$currPos++;
|
|
2142
2424
|
}
|
|
2143
2425
|
else {
|
|
2144
2426
|
s1 = peg$FAILED;
|
|
2145
2427
|
if (peg$silentFails === 0) {
|
|
2146
|
-
peg$fail(peg$
|
|
2428
|
+
peg$fail(peg$c86);
|
|
2147
2429
|
}
|
|
2148
2430
|
}
|
|
2149
2431
|
if (s1 === peg$FAILED) {
|
|
@@ -2153,7 +2435,7 @@
|
|
|
2153
2435
|
s2 = peg$parseargNumber();
|
|
2154
2436
|
if (s2 !== peg$FAILED) {
|
|
2155
2437
|
peg$savedPos = s0;
|
|
2156
|
-
s1 = peg$
|
|
2438
|
+
s1 = peg$c87(s1, s2);
|
|
2157
2439
|
s0 = s1;
|
|
2158
2440
|
}
|
|
2159
2441
|
else {
|
|
@@ -2169,7 +2451,7 @@
|
|
|
2169
2451
|
if (s0 === peg$FAILED) {
|
|
2170
2452
|
s1 = peg$FAILED;
|
|
2171
2453
|
if (peg$silentFails === 0) {
|
|
2172
|
-
peg$fail(peg$
|
|
2454
|
+
peg$fail(peg$c84);
|
|
2173
2455
|
}
|
|
2174
2456
|
}
|
|
2175
2457
|
return s0;
|
|
@@ -2178,26 +2460,26 @@
|
|
|
2178
2460
|
var s0, s1;
|
|
2179
2461
|
peg$silentFails++;
|
|
2180
2462
|
s0 = peg$currPos;
|
|
2181
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
2182
|
-
s1 = peg$
|
|
2463
|
+
if (input.substr(peg$currPos, 2) === peg$c90) {
|
|
2464
|
+
s1 = peg$c90;
|
|
2183
2465
|
peg$currPos += 2;
|
|
2184
2466
|
}
|
|
2185
2467
|
else {
|
|
2186
2468
|
s1 = peg$FAILED;
|
|
2187
2469
|
if (peg$silentFails === 0) {
|
|
2188
|
-
peg$fail(peg$
|
|
2470
|
+
peg$fail(peg$c91);
|
|
2189
2471
|
}
|
|
2190
2472
|
}
|
|
2191
2473
|
if (s1 !== peg$FAILED) {
|
|
2192
2474
|
peg$savedPos = s0;
|
|
2193
|
-
s1 = peg$
|
|
2475
|
+
s1 = peg$c92();
|
|
2194
2476
|
}
|
|
2195
2477
|
s0 = s1;
|
|
2196
2478
|
peg$silentFails--;
|
|
2197
2479
|
if (s0 === peg$FAILED) {
|
|
2198
2480
|
s1 = peg$FAILED;
|
|
2199
2481
|
if (peg$silentFails === 0) {
|
|
2200
|
-
peg$fail(peg$
|
|
2482
|
+
peg$fail(peg$c89);
|
|
2201
2483
|
}
|
|
2202
2484
|
}
|
|
2203
2485
|
return s0;
|
|
@@ -2206,13 +2488,13 @@
|
|
|
2206
2488
|
var s0, s1, s2, s3, s4, s5;
|
|
2207
2489
|
s0 = peg$currPos;
|
|
2208
2490
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
2209
|
-
s1 = peg$
|
|
2491
|
+
s1 = peg$c47;
|
|
2210
2492
|
peg$currPos++;
|
|
2211
2493
|
}
|
|
2212
2494
|
else {
|
|
2213
2495
|
s1 = peg$FAILED;
|
|
2214
2496
|
if (peg$silentFails === 0) {
|
|
2215
|
-
peg$fail(peg$
|
|
2497
|
+
peg$fail(peg$c48);
|
|
2216
2498
|
}
|
|
2217
2499
|
}
|
|
2218
2500
|
if (s1 !== peg$FAILED) {
|
|
@@ -2220,49 +2502,49 @@
|
|
|
2220
2502
|
if (s2 !== peg$FAILED) {
|
|
2221
2503
|
s3 = peg$currPos;
|
|
2222
2504
|
s4 = [];
|
|
2223
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
2224
|
-
s5 = peg$
|
|
2505
|
+
if (input.substr(peg$currPos, 2) === peg$c90) {
|
|
2506
|
+
s5 = peg$c90;
|
|
2225
2507
|
peg$currPos += 2;
|
|
2226
2508
|
}
|
|
2227
2509
|
else {
|
|
2228
2510
|
s5 = peg$FAILED;
|
|
2229
2511
|
if (peg$silentFails === 0) {
|
|
2230
|
-
peg$fail(peg$
|
|
2512
|
+
peg$fail(peg$c91);
|
|
2231
2513
|
}
|
|
2232
2514
|
}
|
|
2233
2515
|
if (s5 === peg$FAILED) {
|
|
2234
|
-
if (peg$
|
|
2516
|
+
if (peg$c49.test(input.charAt(peg$currPos))) {
|
|
2235
2517
|
s5 = input.charAt(peg$currPos);
|
|
2236
2518
|
peg$currPos++;
|
|
2237
2519
|
}
|
|
2238
2520
|
else {
|
|
2239
2521
|
s5 = peg$FAILED;
|
|
2240
2522
|
if (peg$silentFails === 0) {
|
|
2241
|
-
peg$fail(peg$
|
|
2523
|
+
peg$fail(peg$c50);
|
|
2242
2524
|
}
|
|
2243
2525
|
}
|
|
2244
2526
|
}
|
|
2245
2527
|
while (s5 !== peg$FAILED) {
|
|
2246
2528
|
s4.push(s5);
|
|
2247
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
2248
|
-
s5 = peg$
|
|
2529
|
+
if (input.substr(peg$currPos, 2) === peg$c90) {
|
|
2530
|
+
s5 = peg$c90;
|
|
2249
2531
|
peg$currPos += 2;
|
|
2250
2532
|
}
|
|
2251
2533
|
else {
|
|
2252
2534
|
s5 = peg$FAILED;
|
|
2253
2535
|
if (peg$silentFails === 0) {
|
|
2254
|
-
peg$fail(peg$
|
|
2536
|
+
peg$fail(peg$c91);
|
|
2255
2537
|
}
|
|
2256
2538
|
}
|
|
2257
2539
|
if (s5 === peg$FAILED) {
|
|
2258
|
-
if (peg$
|
|
2540
|
+
if (peg$c49.test(input.charAt(peg$currPos))) {
|
|
2259
2541
|
s5 = input.charAt(peg$currPos);
|
|
2260
2542
|
peg$currPos++;
|
|
2261
2543
|
}
|
|
2262
2544
|
else {
|
|
2263
2545
|
s5 = peg$FAILED;
|
|
2264
2546
|
if (peg$silentFails === 0) {
|
|
2265
|
-
peg$fail(peg$
|
|
2547
|
+
peg$fail(peg$c50);
|
|
2266
2548
|
}
|
|
2267
2549
|
}
|
|
2268
2550
|
}
|
|
@@ -2275,13 +2557,13 @@
|
|
|
2275
2557
|
}
|
|
2276
2558
|
if (s3 !== peg$FAILED) {
|
|
2277
2559
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
2278
|
-
s4 = peg$
|
|
2560
|
+
s4 = peg$c47;
|
|
2279
2561
|
peg$currPos++;
|
|
2280
2562
|
}
|
|
2281
2563
|
else {
|
|
2282
2564
|
s4 = peg$FAILED;
|
|
2283
2565
|
if (peg$silentFails === 0) {
|
|
2284
|
-
peg$fail(peg$
|
|
2566
|
+
peg$fail(peg$c48);
|
|
2285
2567
|
}
|
|
2286
2568
|
}
|
|
2287
2569
|
if (s4 === peg$FAILED) {
|
|
@@ -2289,7 +2571,7 @@
|
|
|
2289
2571
|
}
|
|
2290
2572
|
if (s4 !== peg$FAILED) {
|
|
2291
2573
|
peg$savedPos = s0;
|
|
2292
|
-
s1 = peg$
|
|
2574
|
+
s1 = peg$c93(s2, s3);
|
|
2293
2575
|
s0 = s1;
|
|
2294
2576
|
}
|
|
2295
2577
|
else {
|
|
@@ -2324,12 +2606,12 @@
|
|
|
2324
2606
|
else {
|
|
2325
2607
|
s2 = peg$FAILED;
|
|
2326
2608
|
if (peg$silentFails === 0) {
|
|
2327
|
-
peg$fail(peg$
|
|
2609
|
+
peg$fail(peg$c29);
|
|
2328
2610
|
}
|
|
2329
2611
|
}
|
|
2330
2612
|
if (s2 !== peg$FAILED) {
|
|
2331
2613
|
peg$savedPos = peg$currPos;
|
|
2332
|
-
s3 = peg$
|
|
2614
|
+
s3 = peg$c94(s2);
|
|
2333
2615
|
if (s3) {
|
|
2334
2616
|
s3 = undefined;
|
|
2335
2617
|
}
|
|
@@ -2351,13 +2633,13 @@
|
|
|
2351
2633
|
}
|
|
2352
2634
|
if (s1 === peg$FAILED) {
|
|
2353
2635
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
2354
|
-
s1 = peg$
|
|
2636
|
+
s1 = peg$c95;
|
|
2355
2637
|
peg$currPos++;
|
|
2356
2638
|
}
|
|
2357
2639
|
else {
|
|
2358
2640
|
s1 = peg$FAILED;
|
|
2359
2641
|
if (peg$silentFails === 0) {
|
|
2360
|
-
peg$fail(peg$
|
|
2642
|
+
peg$fail(peg$c96);
|
|
2361
2643
|
}
|
|
2362
2644
|
}
|
|
2363
2645
|
}
|
|
@@ -2380,12 +2662,12 @@
|
|
|
2380
2662
|
else {
|
|
2381
2663
|
s2 = peg$FAILED;
|
|
2382
2664
|
if (peg$silentFails === 0) {
|
|
2383
|
-
peg$fail(peg$
|
|
2665
|
+
peg$fail(peg$c29);
|
|
2384
2666
|
}
|
|
2385
2667
|
}
|
|
2386
2668
|
if (s2 !== peg$FAILED) {
|
|
2387
2669
|
peg$savedPos = peg$currPos;
|
|
2388
|
-
s3 = peg$
|
|
2670
|
+
s3 = peg$c97(s2);
|
|
2389
2671
|
if (s3) {
|
|
2390
2672
|
s3 = undefined;
|
|
2391
2673
|
}
|
|
@@ -2431,7 +2713,30 @@
|
|
|
2431
2713
|
if (s0 === peg$FAILED) {
|
|
2432
2714
|
s1 = peg$FAILED;
|
|
2433
2715
|
if (peg$silentFails === 0) {
|
|
2434
|
-
peg$fail(peg$
|
|
2716
|
+
peg$fail(peg$c98);
|
|
2717
|
+
}
|
|
2718
|
+
}
|
|
2719
|
+
return s0;
|
|
2720
|
+
}
|
|
2721
|
+
function peg$parsevalidTag() {
|
|
2722
|
+
var s0, s1;
|
|
2723
|
+
peg$silentFails++;
|
|
2724
|
+
s0 = peg$currPos;
|
|
2725
|
+
s1 = peg$parseargNumber();
|
|
2726
|
+
if (s1 === peg$FAILED) {
|
|
2727
|
+
s1 = peg$parsetagName();
|
|
2728
|
+
}
|
|
2729
|
+
if (s1 !== peg$FAILED) {
|
|
2730
|
+
s0 = input.substring(s0, peg$currPos);
|
|
2731
|
+
}
|
|
2732
|
+
else {
|
|
2733
|
+
s0 = s1;
|
|
2734
|
+
}
|
|
2735
|
+
peg$silentFails--;
|
|
2736
|
+
if (s0 === peg$FAILED) {
|
|
2737
|
+
s1 = peg$FAILED;
|
|
2738
|
+
if (peg$silentFails === 0) {
|
|
2739
|
+
peg$fail(peg$c99);
|
|
2435
2740
|
}
|
|
2436
2741
|
}
|
|
2437
2742
|
return s0;
|
|
@@ -2441,55 +2746,55 @@
|
|
|
2441
2746
|
peg$silentFails++;
|
|
2442
2747
|
s0 = peg$currPos;
|
|
2443
2748
|
if (input.charCodeAt(peg$currPos) === 48) {
|
|
2444
|
-
s1 = peg$
|
|
2749
|
+
s1 = peg$c101;
|
|
2445
2750
|
peg$currPos++;
|
|
2446
2751
|
}
|
|
2447
2752
|
else {
|
|
2448
2753
|
s1 = peg$FAILED;
|
|
2449
2754
|
if (peg$silentFails === 0) {
|
|
2450
|
-
peg$fail(peg$
|
|
2755
|
+
peg$fail(peg$c102);
|
|
2451
2756
|
}
|
|
2452
2757
|
}
|
|
2453
2758
|
if (s1 !== peg$FAILED) {
|
|
2454
2759
|
peg$savedPos = s0;
|
|
2455
|
-
s1 = peg$
|
|
2760
|
+
s1 = peg$c103();
|
|
2456
2761
|
}
|
|
2457
2762
|
s0 = s1;
|
|
2458
2763
|
if (s0 === peg$FAILED) {
|
|
2459
2764
|
s0 = peg$currPos;
|
|
2460
2765
|
s1 = peg$currPos;
|
|
2461
|
-
if (peg$
|
|
2766
|
+
if (peg$c104.test(input.charAt(peg$currPos))) {
|
|
2462
2767
|
s2 = input.charAt(peg$currPos);
|
|
2463
2768
|
peg$currPos++;
|
|
2464
2769
|
}
|
|
2465
2770
|
else {
|
|
2466
2771
|
s2 = peg$FAILED;
|
|
2467
2772
|
if (peg$silentFails === 0) {
|
|
2468
|
-
peg$fail(peg$
|
|
2773
|
+
peg$fail(peg$c105);
|
|
2469
2774
|
}
|
|
2470
2775
|
}
|
|
2471
2776
|
if (s2 !== peg$FAILED) {
|
|
2472
2777
|
s3 = [];
|
|
2473
|
-
if (peg$
|
|
2778
|
+
if (peg$c106.test(input.charAt(peg$currPos))) {
|
|
2474
2779
|
s4 = input.charAt(peg$currPos);
|
|
2475
2780
|
peg$currPos++;
|
|
2476
2781
|
}
|
|
2477
2782
|
else {
|
|
2478
2783
|
s4 = peg$FAILED;
|
|
2479
2784
|
if (peg$silentFails === 0) {
|
|
2480
|
-
peg$fail(peg$
|
|
2785
|
+
peg$fail(peg$c107);
|
|
2481
2786
|
}
|
|
2482
2787
|
}
|
|
2483
2788
|
while (s4 !== peg$FAILED) {
|
|
2484
2789
|
s3.push(s4);
|
|
2485
|
-
if (peg$
|
|
2790
|
+
if (peg$c106.test(input.charAt(peg$currPos))) {
|
|
2486
2791
|
s4 = input.charAt(peg$currPos);
|
|
2487
2792
|
peg$currPos++;
|
|
2488
2793
|
}
|
|
2489
2794
|
else {
|
|
2490
2795
|
s4 = peg$FAILED;
|
|
2491
2796
|
if (peg$silentFails === 0) {
|
|
2492
|
-
peg$fail(peg$
|
|
2797
|
+
peg$fail(peg$c107);
|
|
2493
2798
|
}
|
|
2494
2799
|
}
|
|
2495
2800
|
}
|
|
@@ -2508,7 +2813,7 @@
|
|
|
2508
2813
|
}
|
|
2509
2814
|
if (s1 !== peg$FAILED) {
|
|
2510
2815
|
peg$savedPos = s0;
|
|
2511
|
-
s1 = peg$
|
|
2816
|
+
s1 = peg$c108(s1);
|
|
2512
2817
|
}
|
|
2513
2818
|
s0 = s1;
|
|
2514
2819
|
}
|
|
@@ -2516,7 +2821,7 @@
|
|
|
2516
2821
|
if (s0 === peg$FAILED) {
|
|
2517
2822
|
s1 = peg$FAILED;
|
|
2518
2823
|
if (peg$silentFails === 0) {
|
|
2519
|
-
peg$fail(peg$
|
|
2824
|
+
peg$fail(peg$c100);
|
|
2520
2825
|
}
|
|
2521
2826
|
}
|
|
2522
2827
|
return s0;
|
|
@@ -2549,7 +2854,7 @@
|
|
|
2549
2854
|
else {
|
|
2550
2855
|
s4 = peg$FAILED;
|
|
2551
2856
|
if (peg$silentFails === 0) {
|
|
2552
|
-
peg$fail(peg$
|
|
2857
|
+
peg$fail(peg$c29);
|
|
2553
2858
|
}
|
|
2554
2859
|
}
|
|
2555
2860
|
if (s4 !== peg$FAILED) {
|
|
@@ -2591,7 +2896,7 @@
|
|
|
2591
2896
|
else {
|
|
2592
2897
|
s4 = peg$FAILED;
|
|
2593
2898
|
if (peg$silentFails === 0) {
|
|
2594
|
-
peg$fail(peg$
|
|
2899
|
+
peg$fail(peg$c29);
|
|
2595
2900
|
}
|
|
2596
2901
|
}
|
|
2597
2902
|
if (s4 !== peg$FAILED) {
|
|
@@ -2622,7 +2927,137 @@
|
|
|
2622
2927
|
if (s0 === peg$FAILED) {
|
|
2623
2928
|
s1 = peg$FAILED;
|
|
2624
2929
|
if (peg$silentFails === 0) {
|
|
2625
|
-
peg$fail(peg$
|
|
2930
|
+
peg$fail(peg$c109);
|
|
2931
|
+
}
|
|
2932
|
+
}
|
|
2933
|
+
return s0;
|
|
2934
|
+
}
|
|
2935
|
+
function peg$parsetagName() {
|
|
2936
|
+
var s0, s1, s2, s3, s4;
|
|
2937
|
+
peg$silentFails++;
|
|
2938
|
+
s0 = peg$currPos;
|
|
2939
|
+
s1 = [];
|
|
2940
|
+
if (input.charCodeAt(peg$currPos) === 45) {
|
|
2941
|
+
s2 = peg$c85;
|
|
2942
|
+
peg$currPos++;
|
|
2943
|
+
}
|
|
2944
|
+
else {
|
|
2945
|
+
s2 = peg$FAILED;
|
|
2946
|
+
if (peg$silentFails === 0) {
|
|
2947
|
+
peg$fail(peg$c86);
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2950
|
+
if (s2 === peg$FAILED) {
|
|
2951
|
+
s2 = peg$currPos;
|
|
2952
|
+
s3 = peg$currPos;
|
|
2953
|
+
peg$silentFails++;
|
|
2954
|
+
s4 = peg$parsewhiteSpace();
|
|
2955
|
+
if (s4 === peg$FAILED) {
|
|
2956
|
+
s4 = peg$parsepatternSyntax();
|
|
2957
|
+
}
|
|
2958
|
+
peg$silentFails--;
|
|
2959
|
+
if (s4 === peg$FAILED) {
|
|
2960
|
+
s3 = undefined;
|
|
2961
|
+
}
|
|
2962
|
+
else {
|
|
2963
|
+
peg$currPos = s3;
|
|
2964
|
+
s3 = peg$FAILED;
|
|
2965
|
+
}
|
|
2966
|
+
if (s3 !== peg$FAILED) {
|
|
2967
|
+
if (input.length > peg$currPos) {
|
|
2968
|
+
s4 = input.charAt(peg$currPos);
|
|
2969
|
+
peg$currPos++;
|
|
2970
|
+
}
|
|
2971
|
+
else {
|
|
2972
|
+
s4 = peg$FAILED;
|
|
2973
|
+
if (peg$silentFails === 0) {
|
|
2974
|
+
peg$fail(peg$c29);
|
|
2975
|
+
}
|
|
2976
|
+
}
|
|
2977
|
+
if (s4 !== peg$FAILED) {
|
|
2978
|
+
s3 = [s3, s4];
|
|
2979
|
+
s2 = s3;
|
|
2980
|
+
}
|
|
2981
|
+
else {
|
|
2982
|
+
peg$currPos = s2;
|
|
2983
|
+
s2 = peg$FAILED;
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2986
|
+
else {
|
|
2987
|
+
peg$currPos = s2;
|
|
2988
|
+
s2 = peg$FAILED;
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
if (s2 !== peg$FAILED) {
|
|
2992
|
+
while (s2 !== peg$FAILED) {
|
|
2993
|
+
s1.push(s2);
|
|
2994
|
+
if (input.charCodeAt(peg$currPos) === 45) {
|
|
2995
|
+
s2 = peg$c85;
|
|
2996
|
+
peg$currPos++;
|
|
2997
|
+
}
|
|
2998
|
+
else {
|
|
2999
|
+
s2 = peg$FAILED;
|
|
3000
|
+
if (peg$silentFails === 0) {
|
|
3001
|
+
peg$fail(peg$c86);
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
if (s2 === peg$FAILED) {
|
|
3005
|
+
s2 = peg$currPos;
|
|
3006
|
+
s3 = peg$currPos;
|
|
3007
|
+
peg$silentFails++;
|
|
3008
|
+
s4 = peg$parsewhiteSpace();
|
|
3009
|
+
if (s4 === peg$FAILED) {
|
|
3010
|
+
s4 = peg$parsepatternSyntax();
|
|
3011
|
+
}
|
|
3012
|
+
peg$silentFails--;
|
|
3013
|
+
if (s4 === peg$FAILED) {
|
|
3014
|
+
s3 = undefined;
|
|
3015
|
+
}
|
|
3016
|
+
else {
|
|
3017
|
+
peg$currPos = s3;
|
|
3018
|
+
s3 = peg$FAILED;
|
|
3019
|
+
}
|
|
3020
|
+
if (s3 !== peg$FAILED) {
|
|
3021
|
+
if (input.length > peg$currPos) {
|
|
3022
|
+
s4 = input.charAt(peg$currPos);
|
|
3023
|
+
peg$currPos++;
|
|
3024
|
+
}
|
|
3025
|
+
else {
|
|
3026
|
+
s4 = peg$FAILED;
|
|
3027
|
+
if (peg$silentFails === 0) {
|
|
3028
|
+
peg$fail(peg$c29);
|
|
3029
|
+
}
|
|
3030
|
+
}
|
|
3031
|
+
if (s4 !== peg$FAILED) {
|
|
3032
|
+
s3 = [s3, s4];
|
|
3033
|
+
s2 = s3;
|
|
3034
|
+
}
|
|
3035
|
+
else {
|
|
3036
|
+
peg$currPos = s2;
|
|
3037
|
+
s2 = peg$FAILED;
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
else {
|
|
3041
|
+
peg$currPos = s2;
|
|
3042
|
+
s2 = peg$FAILED;
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
else {
|
|
3048
|
+
s1 = peg$FAILED;
|
|
3049
|
+
}
|
|
3050
|
+
if (s1 !== peg$FAILED) {
|
|
3051
|
+
s0 = input.substring(s0, peg$currPos);
|
|
3052
|
+
}
|
|
3053
|
+
else {
|
|
3054
|
+
s0 = s1;
|
|
3055
|
+
}
|
|
3056
|
+
peg$silentFails--;
|
|
3057
|
+
if (s0 === peg$FAILED) {
|
|
3058
|
+
s1 = peg$FAILED;
|
|
3059
|
+
if (peg$silentFails === 0) {
|
|
3060
|
+
peg$fail(peg$c110);
|
|
2626
3061
|
}
|
|
2627
3062
|
}
|
|
2628
3063
|
return s0;
|
|
@@ -3075,22 +3510,33 @@
|
|
|
3075
3510
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3076
3511
|
};
|
|
3077
3512
|
})();
|
|
3078
|
-
var __spreadArrays$2 = (undefined && undefined.__spreadArrays) || function () {
|
|
3079
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
3080
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
3081
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
3082
|
-
r[k] = a[j];
|
|
3083
|
-
return r;
|
|
3084
|
-
};
|
|
3085
3513
|
var FormatError = /** @class */ (function (_super) {
|
|
3086
3514
|
__extends$1(FormatError, _super);
|
|
3087
|
-
function FormatError(msg,
|
|
3515
|
+
function FormatError(msg, code) {
|
|
3088
3516
|
var _this = _super.call(this, msg) || this;
|
|
3089
|
-
_this.
|
|
3517
|
+
_this.code = code;
|
|
3090
3518
|
return _this;
|
|
3091
3519
|
}
|
|
3520
|
+
FormatError.prototype.toString = function () {
|
|
3521
|
+
return "[formatjs Error: " + this.code + "] " + this.message;
|
|
3522
|
+
};
|
|
3092
3523
|
return FormatError;
|
|
3093
3524
|
}(Error));
|
|
3525
|
+
var InvalidValueError = /** @class */ (function (_super) {
|
|
3526
|
+
__extends$1(InvalidValueError, _super);
|
|
3527
|
+
function InvalidValueError(variableId, value, options) {
|
|
3528
|
+
return _super.call(this, "Invalid values for \"" + variableId + "\": \"" + value + "\". Options are \"" + Object.keys(options).join('", "') + "\"", 1 /* INVALID_VALUE */) || this;
|
|
3529
|
+
}
|
|
3530
|
+
return InvalidValueError;
|
|
3531
|
+
}(FormatError));
|
|
3532
|
+
var MissingValueError = /** @class */ (function (_super) {
|
|
3533
|
+
__extends$1(MissingValueError, _super);
|
|
3534
|
+
function MissingValueError(variableId, originalMessage) {
|
|
3535
|
+
return _super.call(this, "The intl string context variable \"" + variableId + "\" was not provided to the string \"" + originalMessage + "\"", 0 /* MISSING_VALUE */) || this;
|
|
3536
|
+
}
|
|
3537
|
+
return MissingValueError;
|
|
3538
|
+
}(FormatError));
|
|
3539
|
+
|
|
3094
3540
|
function mergeLiteral(parts) {
|
|
3095
3541
|
if (parts.length < 2) {
|
|
3096
3542
|
return parts;
|
|
@@ -3108,6 +3554,9 @@
|
|
|
3108
3554
|
return all;
|
|
3109
3555
|
}, []);
|
|
3110
3556
|
}
|
|
3557
|
+
function isFormatXMLElementFn(el) {
|
|
3558
|
+
return typeof el === 'function';
|
|
3559
|
+
}
|
|
3111
3560
|
// TODO(skeleton): add skeleton support
|
|
3112
3561
|
function formatToParts(els, locales, formatters, formats, values, currentPluralValue,
|
|
3113
3562
|
// For debugging
|
|
@@ -3146,7 +3595,7 @@
|
|
|
3146
3595
|
var varName = el.value;
|
|
3147
3596
|
// Enforce that all required values are provided by the caller.
|
|
3148
3597
|
if (!(values && varName in values)) {
|
|
3149
|
-
throw new
|
|
3598
|
+
throw new MissingValueError(varName, originalMessage);
|
|
3150
3599
|
}
|
|
3151
3600
|
var value = values[varName];
|
|
3152
3601
|
if (isArgumentElement(el)) {
|
|
@@ -3157,7 +3606,7 @@
|
|
|
3157
3606
|
: '';
|
|
3158
3607
|
}
|
|
3159
3608
|
result.push({
|
|
3160
|
-
type: 1 /*
|
|
3609
|
+
type: typeof value === 'string' ? 0 /* literal */ : 1 /* object */,
|
|
3161
3610
|
value: value,
|
|
3162
3611
|
});
|
|
3163
3612
|
continue;
|
|
@@ -3203,10 +3652,28 @@
|
|
|
3203
3652
|
});
|
|
3204
3653
|
continue;
|
|
3205
3654
|
}
|
|
3655
|
+
if (isTagElement(el)) {
|
|
3656
|
+
var children = el.children, value_1 = el.value;
|
|
3657
|
+
var formatFn = values[value_1];
|
|
3658
|
+
if (!isFormatXMLElementFn(formatFn)) {
|
|
3659
|
+
throw new TypeError("Value for \"" + value_1 + "\" must be a function");
|
|
3660
|
+
}
|
|
3661
|
+
var parts = formatToParts(children, locales, formatters, formats, values);
|
|
3662
|
+
var chunks = formatFn.apply(void 0, parts.map(function (p) { return p.value; }));
|
|
3663
|
+
if (!Array.isArray(chunks)) {
|
|
3664
|
+
chunks = [chunks];
|
|
3665
|
+
}
|
|
3666
|
+
result.push.apply(result, chunks.map(function (c) {
|
|
3667
|
+
return {
|
|
3668
|
+
type: typeof c === 'string' ? 0 /* literal */ : 1 /* object */,
|
|
3669
|
+
value: c,
|
|
3670
|
+
};
|
|
3671
|
+
}));
|
|
3672
|
+
}
|
|
3206
3673
|
if (isSelectElement(el)) {
|
|
3207
3674
|
var opt = el.options[value] || el.options.other;
|
|
3208
3675
|
if (!opt) {
|
|
3209
|
-
throw new
|
|
3676
|
+
throw new InvalidValueError(el.value, value, Object.keys(el.options));
|
|
3210
3677
|
}
|
|
3211
3678
|
result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));
|
|
3212
3679
|
continue;
|
|
@@ -3215,7 +3682,7 @@
|
|
|
3215
3682
|
var opt = el.options["=" + value];
|
|
3216
3683
|
if (!opt) {
|
|
3217
3684
|
if (!Intl.PluralRules) {
|
|
3218
|
-
throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n");
|
|
3685
|
+
throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n", 2 /* MISSING_INTL_API */);
|
|
3219
3686
|
}
|
|
3220
3687
|
var rule = formatters
|
|
3221
3688
|
.getPluralRules(locales, { type: el.pluralType })
|
|
@@ -3223,7 +3690,7 @@
|
|
|
3223
3690
|
opt = el.options[rule] || el.options.other;
|
|
3224
3691
|
}
|
|
3225
3692
|
if (!opt) {
|
|
3226
|
-
throw new
|
|
3693
|
+
throw new InvalidValueError(el.value, value, Object.keys(el.options));
|
|
3227
3694
|
}
|
|
3228
3695
|
result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));
|
|
3229
3696
|
continue;
|
|
@@ -3231,139 +3698,6 @@
|
|
|
3231
3698
|
}
|
|
3232
3699
|
return mergeLiteral(result);
|
|
3233
3700
|
}
|
|
3234
|
-
function formatToString(els, locales, formatters, formats, values,
|
|
3235
|
-
// For debugging
|
|
3236
|
-
originalMessage) {
|
|
3237
|
-
var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage);
|
|
3238
|
-
// Hot path for straight simple msg translations
|
|
3239
|
-
if (parts.length === 1) {
|
|
3240
|
-
return parts[0].value;
|
|
3241
|
-
}
|
|
3242
|
-
return parts.reduce(function (all, part) { return (all += part.value); }, '');
|
|
3243
|
-
}
|
|
3244
|
-
// Singleton
|
|
3245
|
-
var domParser;
|
|
3246
|
-
var TOKEN_DELIMITER = '@@';
|
|
3247
|
-
var TOKEN_REGEX = /@@(\d+_\d+)@@/g;
|
|
3248
|
-
var counter = 0;
|
|
3249
|
-
function generateId() {
|
|
3250
|
-
return Date.now() + "_" + ++counter;
|
|
3251
|
-
}
|
|
3252
|
-
function restoreRichPlaceholderMessage(text, objectParts) {
|
|
3253
|
-
return text
|
|
3254
|
-
.split(TOKEN_REGEX)
|
|
3255
|
-
.filter(Boolean)
|
|
3256
|
-
.map(function (c) { return (objectParts[c] != null ? objectParts[c] : c); })
|
|
3257
|
-
.reduce(function (all, c) {
|
|
3258
|
-
if (!all.length) {
|
|
3259
|
-
all.push(c);
|
|
3260
|
-
}
|
|
3261
|
-
else if (typeof c === 'string' &&
|
|
3262
|
-
typeof all[all.length - 1] === 'string') {
|
|
3263
|
-
all[all.length - 1] += c;
|
|
3264
|
-
}
|
|
3265
|
-
else {
|
|
3266
|
-
all.push(c);
|
|
3267
|
-
}
|
|
3268
|
-
return all;
|
|
3269
|
-
}, []);
|
|
3270
|
-
}
|
|
3271
|
-
/**
|
|
3272
|
-
* Not exhaustive, just for sanity check
|
|
3273
|
-
*/
|
|
3274
|
-
var SIMPLE_XML_REGEX = /(<([0-9a-zA-Z-_]*?)>(.*?)<\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\/>)/;
|
|
3275
|
-
var TEMPLATE_ID = Date.now() + '@@';
|
|
3276
|
-
var VOID_ELEMENTS = [
|
|
3277
|
-
'area',
|
|
3278
|
-
'base',
|
|
3279
|
-
'br',
|
|
3280
|
-
'col',
|
|
3281
|
-
'embed',
|
|
3282
|
-
'hr',
|
|
3283
|
-
'img',
|
|
3284
|
-
'input',
|
|
3285
|
-
'link',
|
|
3286
|
-
'meta',
|
|
3287
|
-
'param',
|
|
3288
|
-
'source',
|
|
3289
|
-
'track',
|
|
3290
|
-
'wbr',
|
|
3291
|
-
];
|
|
3292
|
-
function formatHTMLElement(el, objectParts, values) {
|
|
3293
|
-
var tagName = el.tagName;
|
|
3294
|
-
var outerHTML = el.outerHTML, textContent = el.textContent, childNodes = el.childNodes;
|
|
3295
|
-
// Regular text
|
|
3296
|
-
if (!tagName) {
|
|
3297
|
-
return restoreRichPlaceholderMessage(textContent || '', objectParts);
|
|
3298
|
-
}
|
|
3299
|
-
tagName = tagName.toLowerCase();
|
|
3300
|
-
var isVoidElement = ~VOID_ELEMENTS.indexOf(tagName);
|
|
3301
|
-
var formatFnOrValue = values[tagName];
|
|
3302
|
-
if (formatFnOrValue && isVoidElement) {
|
|
3303
|
-
throw new FormatError(tagName + " is a self-closing tag and can not be used, please use another tag name.");
|
|
3304
|
-
}
|
|
3305
|
-
if (!childNodes.length) {
|
|
3306
|
-
return [outerHTML];
|
|
3307
|
-
}
|
|
3308
|
-
var chunks = Array.prototype.slice.call(childNodes).reduce(function (all, child) {
|
|
3309
|
-
return all.concat(formatHTMLElement(child, objectParts, values));
|
|
3310
|
-
}, []);
|
|
3311
|
-
// Legacy HTML
|
|
3312
|
-
if (!formatFnOrValue) {
|
|
3313
|
-
return __spreadArrays$2(["<" + tagName + ">"], chunks, ["</" + tagName + ">"]);
|
|
3314
|
-
}
|
|
3315
|
-
// HTML Tag replacement
|
|
3316
|
-
if (typeof formatFnOrValue === 'function') {
|
|
3317
|
-
return [formatFnOrValue.apply(void 0, chunks)];
|
|
3318
|
-
}
|
|
3319
|
-
return [formatFnOrValue];
|
|
3320
|
-
}
|
|
3321
|
-
function formatHTMLMessage(els, locales, formatters, formats, values,
|
|
3322
|
-
// For debugging
|
|
3323
|
-
originalMessage) {
|
|
3324
|
-
var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage);
|
|
3325
|
-
var objectParts = {};
|
|
3326
|
-
var formattedMessage = parts.reduce(function (all, part) {
|
|
3327
|
-
if (part.type === 0 /* literal */) {
|
|
3328
|
-
return (all += part.value);
|
|
3329
|
-
}
|
|
3330
|
-
var id = generateId();
|
|
3331
|
-
objectParts[id] = part.value;
|
|
3332
|
-
return (all += "" + TOKEN_DELIMITER + id + TOKEN_DELIMITER);
|
|
3333
|
-
}, '');
|
|
3334
|
-
// Not designed to filter out aggressively
|
|
3335
|
-
if (!SIMPLE_XML_REGEX.test(formattedMessage)) {
|
|
3336
|
-
return restoreRichPlaceholderMessage(formattedMessage, objectParts);
|
|
3337
|
-
}
|
|
3338
|
-
if (!values) {
|
|
3339
|
-
throw new FormatError('Message has placeholders but no values was given');
|
|
3340
|
-
}
|
|
3341
|
-
if (typeof DOMParser === 'undefined') {
|
|
3342
|
-
throw new FormatError('Cannot format XML message without DOMParser');
|
|
3343
|
-
}
|
|
3344
|
-
if (!domParser) {
|
|
3345
|
-
domParser = new DOMParser();
|
|
3346
|
-
}
|
|
3347
|
-
var content = domParser
|
|
3348
|
-
.parseFromString("<formatted-message id=\"" + TEMPLATE_ID + "\">" + formattedMessage + "</formatted-message>", 'text/html')
|
|
3349
|
-
.getElementById(TEMPLATE_ID);
|
|
3350
|
-
if (!content) {
|
|
3351
|
-
throw new FormatError("Malformed HTML message " + formattedMessage);
|
|
3352
|
-
}
|
|
3353
|
-
var tagsToFormat = Object.keys(values).filter(function (varName) { return !!content.getElementsByTagName(varName).length; });
|
|
3354
|
-
// No tags to format
|
|
3355
|
-
if (!tagsToFormat.length) {
|
|
3356
|
-
return restoreRichPlaceholderMessage(formattedMessage, objectParts);
|
|
3357
|
-
}
|
|
3358
|
-
var caseSensitiveTags = tagsToFormat.filter(function (tagName) { return tagName !== tagName.toLowerCase(); });
|
|
3359
|
-
if (caseSensitiveTags.length) {
|
|
3360
|
-
throw new FormatError("HTML tag must be lowercased but the following tags are not: " + caseSensitiveTags.join(', '));
|
|
3361
|
-
}
|
|
3362
|
-
// We're doing this since top node is `<formatted-message/>` which does not have a formatter
|
|
3363
|
-
return Array.prototype.slice
|
|
3364
|
-
.call(content.childNodes)
|
|
3365
|
-
.reduce(function (all, child) { return all.concat(formatHTMLElement(child, objectParts, values)); }, []);
|
|
3366
|
-
}
|
|
3367
3701
|
|
|
3368
3702
|
/*
|
|
3369
3703
|
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
@@ -3422,14 +3756,30 @@
|
|
|
3422
3756
|
pluralRules: {},
|
|
3423
3757
|
};
|
|
3424
3758
|
this.format = function (values) {
|
|
3425
|
-
|
|
3759
|
+
var parts = _this.formatToParts(values);
|
|
3760
|
+
// Hot path for straight simple msg translations
|
|
3761
|
+
if (parts.length === 1) {
|
|
3762
|
+
return parts[0].value;
|
|
3763
|
+
}
|
|
3764
|
+
var result = parts.reduce(function (all, part) {
|
|
3765
|
+
if (!all.length ||
|
|
3766
|
+
part.type !== 0 /* literal */ ||
|
|
3767
|
+
typeof all[all.length - 1] !== 'string') {
|
|
3768
|
+
all.push(part.value);
|
|
3769
|
+
}
|
|
3770
|
+
else {
|
|
3771
|
+
all[all.length - 1] += part.value;
|
|
3772
|
+
}
|
|
3773
|
+
return all;
|
|
3774
|
+
}, []);
|
|
3775
|
+
if (result.length <= 1) {
|
|
3776
|
+
return result[0] || '';
|
|
3777
|
+
}
|
|
3778
|
+
return result;
|
|
3426
3779
|
};
|
|
3427
3780
|
this.formatToParts = function (values) {
|
|
3428
3781
|
return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);
|
|
3429
3782
|
};
|
|
3430
|
-
this.formatHTMLMessage = function (values) {
|
|
3431
|
-
return formatHTMLMessage(_this.ast, _this.locales, _this.formatters, _this.formats, values, _this.message);
|
|
3432
|
-
};
|
|
3433
3783
|
this.resolvedOptions = function () { return ({
|
|
3434
3784
|
locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],
|
|
3435
3785
|
}); };
|
|
@@ -3528,12 +3878,13 @@
|
|
|
3528
3878
|
See the accompanying LICENSE file for terms.
|
|
3529
3879
|
*/
|
|
3530
3880
|
|
|
3881
|
+
exports.FormatError = FormatError;
|
|
3531
3882
|
exports.IntlMessageFormat = IntlMessageFormat;
|
|
3883
|
+
exports.InvalidValueError = InvalidValueError;
|
|
3884
|
+
exports.MissingValueError = MissingValueError;
|
|
3532
3885
|
exports.createDefaultFormatters = createDefaultFormatters;
|
|
3533
3886
|
exports.default = IntlMessageFormat;
|
|
3534
|
-
exports.formatHTMLMessage = formatHTMLMessage;
|
|
3535
3887
|
exports.formatToParts = formatToParts;
|
|
3536
|
-
exports.formatToString = formatToString;
|
|
3537
3888
|
|
|
3538
3889
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3539
3890
|
|