links-notation 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -383,13 +383,12 @@ function peg$parse(input, options) {
383
383
  const peg$c2 = ")";
384
384
  const peg$c3 = '"';
385
385
  const peg$c4 = "'";
386
- const peg$c5 = " ";
386
+ const peg$c5 = "`";
387
+ const peg$c6 = " ";
387
388
  const peg$r0 = /^[ \t]/;
388
389
  const peg$r1 = /^[\r\n]/;
389
- const peg$r2 = /^[^"]/;
390
- const peg$r3 = /^[^']/;
391
- const peg$r4 = /^[ \t\n\r]/;
392
- const peg$r5 = /^[^ \t\n\r(:)]/;
390
+ const peg$r2 = /^[ \t\n\r]/;
391
+ const peg$r3 = /^[^ \t\n\r(:)]/;
393
392
  const peg$e0 = peg$classExpectation([" ", "\t"], false, false, false);
394
393
  const peg$e1 = peg$classExpectation(["\r", `
395
394
  `], false, false, false);
@@ -397,14 +396,13 @@ function peg$parse(input, options) {
397
396
  const peg$e3 = peg$literalExpectation("(", false);
398
397
  const peg$e4 = peg$literalExpectation(")", false);
399
398
  const peg$e5 = peg$literalExpectation('"', false);
400
- const peg$e6 = peg$classExpectation(['"'], true, false, false);
399
+ const peg$e6 = peg$anyExpectation();
401
400
  const peg$e7 = peg$literalExpectation("'", false);
402
- const peg$e8 = peg$classExpectation(["'"], true, false, false);
401
+ const peg$e8 = peg$literalExpectation("`", false);
403
402
  const peg$e9 = peg$literalExpectation(" ", false);
404
- const peg$e10 = peg$anyExpectation();
405
- const peg$e11 = peg$classExpectation([" ", "\t", `
403
+ const peg$e10 = peg$classExpectation([" ", "\t", `
406
404
  `, "\r"], false, false, false);
407
- const peg$e12 = peg$classExpectation([" ", "\t", `
405
+ const peg$e11 = peg$classExpectation([" ", "\t", `
408
406
  `, "\r", "(", ":", ")"], true, false, false);
409
407
  function peg$f0() {
410
408
  indentationStack = [0];
@@ -489,22 +487,82 @@ function peg$parse(input, options) {
489
487
  function peg$f25(chars) {
490
488
  return chars.join("");
491
489
  }
492
- function peg$f26(r) {
493
- return r.join("");
490
+ function peg$f26() {
491
+ const pos = offset();
492
+ const result = parseQuotedStringAt(input, pos, '"');
493
+ if (result) {
494
+ parsedValue = result.value;
495
+ parsedLength = result.length;
496
+ return true;
497
+ }
498
+ return false;
499
+ }
500
+ function peg$f27(chars) {
501
+ return parsedValue;
502
+ }
503
+ function peg$f28(c, cs) {
504
+ return [c].concat(cs).join("");
505
+ }
506
+ function peg$f29() {
507
+ return parsedLength > 1 && (parsedLength--, true);
508
+ }
509
+ function peg$f30(c) {
510
+ return c;
511
+ }
512
+ function peg$f31() {
513
+ const pos = offset();
514
+ const result = parseQuotedStringAt(input, pos, "'");
515
+ if (result) {
516
+ parsedValue = result.value;
517
+ parsedLength = result.length;
518
+ return true;
519
+ }
520
+ return false;
521
+ }
522
+ function peg$f32(chars) {
523
+ return parsedValue;
524
+ }
525
+ function peg$f33(c, cs) {
526
+ return [c].concat(cs).join("");
527
+ }
528
+ function peg$f34() {
529
+ return parsedLength > 1 && (parsedLength--, true);
530
+ }
531
+ function peg$f35(c) {
532
+ return c;
533
+ }
534
+ function peg$f36() {
535
+ const pos = offset();
536
+ const result = parseQuotedStringAt(input, pos, "`");
537
+ if (result) {
538
+ parsedValue = result.value;
539
+ parsedLength = result.length;
540
+ return true;
541
+ }
542
+ return false;
543
+ }
544
+ function peg$f37(chars) {
545
+ return parsedValue;
546
+ }
547
+ function peg$f38(c, cs) {
548
+ return [c].concat(cs).join("");
549
+ }
550
+ function peg$f39() {
551
+ return parsedLength > 1 && (parsedLength--, true);
494
552
  }
495
- function peg$f27(r) {
496
- return r.join("");
553
+ function peg$f40(c) {
554
+ return c;
497
555
  }
498
- function peg$f28(spaces) {
556
+ function peg$f41(spaces) {
499
557
  setBaseIndentation(spaces);
500
558
  }
501
- function peg$f29(spaces) {
559
+ function peg$f42(spaces) {
502
560
  return normalizeIndentation(spaces) > getCurrentIndentation();
503
561
  }
504
- function peg$f30(spaces) {
562
+ function peg$f43(spaces) {
505
563
  pushIndentation(spaces);
506
564
  }
507
- function peg$f31(spaces) {
565
+ function peg$f44(spaces) {
508
566
  return checkIndentation(spaces);
509
567
  }
510
568
  let peg$currPos = options.peg$currPos | 0;
@@ -1204,12 +1262,9 @@ function peg$parse(input, options) {
1204
1262
  }
1205
1263
  function peg$parsereference() {
1206
1264
  let s0;
1207
- s0 = peg$parsedoubleQuotedReference();
1265
+ s0 = peg$parsequotedReference();
1208
1266
  if (s0 === peg$FAILED) {
1209
- s0 = peg$parsesingleQuotedReference();
1210
- if (s0 === peg$FAILED) {
1211
- s0 = peg$parsesimpleReference();
1212
- }
1267
+ s0 = peg$parsesimpleReference();
1213
1268
  }
1214
1269
  return s0;
1215
1270
  }
@@ -1233,58 +1288,159 @@ function peg$parse(input, options) {
1233
1288
  s0 = s1;
1234
1289
  return s0;
1235
1290
  }
1236
- function peg$parsedoubleQuotedReference() {
1291
+ function peg$parsequotedReference() {
1292
+ let s0;
1293
+ s0 = peg$parsedoubleQuotedUniversal();
1294
+ if (s0 === peg$FAILED) {
1295
+ s0 = peg$parsesingleQuotedUniversal();
1296
+ if (s0 === peg$FAILED) {
1297
+ s0 = peg$parsebacktickQuotedUniversal();
1298
+ }
1299
+ }
1300
+ return s0;
1301
+ }
1302
+ function peg$parsedoubleQuotedUniversal() {
1237
1303
  let s0, s1, s2, s3;
1238
1304
  s0 = peg$currPos;
1305
+ s1 = peg$currPos;
1306
+ peg$silentFails++;
1239
1307
  if (input.charCodeAt(peg$currPos) === 34) {
1240
- s1 = peg$c3;
1308
+ s2 = peg$c3;
1241
1309
  peg$currPos++;
1242
1310
  } else {
1243
- s1 = peg$FAILED;
1311
+ s2 = peg$FAILED;
1244
1312
  if (peg$silentFails === 0) {
1245
1313
  peg$fail(peg$e5);
1246
1314
  }
1247
1315
  }
1316
+ peg$silentFails--;
1317
+ if (s2 !== peg$FAILED) {
1318
+ peg$currPos = s1;
1319
+ s1 = undefined;
1320
+ } else {
1321
+ s1 = peg$FAILED;
1322
+ }
1323
+ if (s1 !== peg$FAILED) {
1324
+ peg$savedPos = peg$currPos;
1325
+ s2 = peg$f26();
1326
+ if (s2) {
1327
+ s2 = undefined;
1328
+ } else {
1329
+ s2 = peg$FAILED;
1330
+ }
1331
+ if (s2 !== peg$FAILED) {
1332
+ s3 = peg$parseconsumeDouble();
1333
+ if (s3 !== peg$FAILED) {
1334
+ peg$savedPos = s0;
1335
+ s0 = peg$f27(s3);
1336
+ } else {
1337
+ peg$currPos = s0;
1338
+ s0 = peg$FAILED;
1339
+ }
1340
+ } else {
1341
+ peg$currPos = s0;
1342
+ s0 = peg$FAILED;
1343
+ }
1344
+ } else {
1345
+ peg$currPos = s0;
1346
+ s0 = peg$FAILED;
1347
+ }
1348
+ return s0;
1349
+ }
1350
+ function peg$parseconsumeDouble() {
1351
+ let s0, s1, s2, s3;
1352
+ s0 = peg$currPos;
1353
+ if (input.length > peg$currPos) {
1354
+ s1 = input.charAt(peg$currPos);
1355
+ peg$currPos++;
1356
+ } else {
1357
+ s1 = peg$FAILED;
1358
+ if (peg$silentFails === 0) {
1359
+ peg$fail(peg$e6);
1360
+ }
1361
+ }
1248
1362
  if (s1 !== peg$FAILED) {
1249
1363
  s2 = [];
1250
- s3 = input.charAt(peg$currPos);
1251
- if (peg$r2.test(s3)) {
1364
+ s3 = peg$parseconsumeDoubleMore();
1365
+ while (s3 !== peg$FAILED) {
1366
+ s2.push(s3);
1367
+ s3 = peg$parseconsumeDoubleMore();
1368
+ }
1369
+ peg$savedPos = s0;
1370
+ s0 = peg$f28(s1, s2);
1371
+ } else {
1372
+ peg$currPos = s0;
1373
+ s0 = peg$FAILED;
1374
+ }
1375
+ return s0;
1376
+ }
1377
+ function peg$parseconsumeDoubleMore() {
1378
+ let s0, s1, s2;
1379
+ s0 = peg$currPos;
1380
+ peg$savedPos = peg$currPos;
1381
+ s1 = peg$f29();
1382
+ if (s1) {
1383
+ s1 = undefined;
1384
+ } else {
1385
+ s1 = peg$FAILED;
1386
+ }
1387
+ if (s1 !== peg$FAILED) {
1388
+ if (input.length > peg$currPos) {
1389
+ s2 = input.charAt(peg$currPos);
1252
1390
  peg$currPos++;
1253
1391
  } else {
1254
- s3 = peg$FAILED;
1392
+ s2 = peg$FAILED;
1255
1393
  if (peg$silentFails === 0) {
1256
1394
  peg$fail(peg$e6);
1257
1395
  }
1258
1396
  }
1259
- if (s3 !== peg$FAILED) {
1260
- while (s3 !== peg$FAILED) {
1261
- s2.push(s3);
1262
- s3 = input.charAt(peg$currPos);
1263
- if (peg$r2.test(s3)) {
1264
- peg$currPos++;
1265
- } else {
1266
- s3 = peg$FAILED;
1267
- if (peg$silentFails === 0) {
1268
- peg$fail(peg$e6);
1269
- }
1270
- }
1271
- }
1397
+ if (s2 !== peg$FAILED) {
1398
+ peg$savedPos = s0;
1399
+ s0 = peg$f30(s2);
1400
+ } else {
1401
+ peg$currPos = s0;
1402
+ s0 = peg$FAILED;
1403
+ }
1404
+ } else {
1405
+ peg$currPos = s0;
1406
+ s0 = peg$FAILED;
1407
+ }
1408
+ return s0;
1409
+ }
1410
+ function peg$parsesingleQuotedUniversal() {
1411
+ let s0, s1, s2, s3;
1412
+ s0 = peg$currPos;
1413
+ s1 = peg$currPos;
1414
+ peg$silentFails++;
1415
+ if (input.charCodeAt(peg$currPos) === 39) {
1416
+ s2 = peg$c4;
1417
+ peg$currPos++;
1418
+ } else {
1419
+ s2 = peg$FAILED;
1420
+ if (peg$silentFails === 0) {
1421
+ peg$fail(peg$e7);
1422
+ }
1423
+ }
1424
+ peg$silentFails--;
1425
+ if (s2 !== peg$FAILED) {
1426
+ peg$currPos = s1;
1427
+ s1 = undefined;
1428
+ } else {
1429
+ s1 = peg$FAILED;
1430
+ }
1431
+ if (s1 !== peg$FAILED) {
1432
+ peg$savedPos = peg$currPos;
1433
+ s2 = peg$f31();
1434
+ if (s2) {
1435
+ s2 = undefined;
1272
1436
  } else {
1273
1437
  s2 = peg$FAILED;
1274
1438
  }
1275
1439
  if (s2 !== peg$FAILED) {
1276
- if (input.charCodeAt(peg$currPos) === 34) {
1277
- s3 = peg$c3;
1278
- peg$currPos++;
1279
- } else {
1280
- s3 = peg$FAILED;
1281
- if (peg$silentFails === 0) {
1282
- peg$fail(peg$e5);
1283
- }
1284
- }
1440
+ s3 = peg$parseconsumeSingle();
1285
1441
  if (s3 !== peg$FAILED) {
1286
1442
  peg$savedPos = s0;
1287
- s0 = peg$f26(s2);
1443
+ s0 = peg$f32(s3);
1288
1444
  } else {
1289
1445
  peg$currPos = s0;
1290
1446
  s0 = peg$FAILED;
@@ -1299,58 +1455,100 @@ function peg$parse(input, options) {
1299
1455
  }
1300
1456
  return s0;
1301
1457
  }
1302
- function peg$parsesingleQuotedReference() {
1458
+ function peg$parseconsumeSingle() {
1303
1459
  let s0, s1, s2, s3;
1304
1460
  s0 = peg$currPos;
1305
- if (input.charCodeAt(peg$currPos) === 39) {
1306
- s1 = peg$c4;
1461
+ if (input.length > peg$currPos) {
1462
+ s1 = input.charAt(peg$currPos);
1307
1463
  peg$currPos++;
1308
1464
  } else {
1309
1465
  s1 = peg$FAILED;
1310
1466
  if (peg$silentFails === 0) {
1311
- peg$fail(peg$e7);
1467
+ peg$fail(peg$e6);
1312
1468
  }
1313
1469
  }
1314
1470
  if (s1 !== peg$FAILED) {
1315
1471
  s2 = [];
1316
- s3 = input.charAt(peg$currPos);
1317
- if (peg$r3.test(s3)) {
1472
+ s3 = peg$parseconsumeSingleMore();
1473
+ while (s3 !== peg$FAILED) {
1474
+ s2.push(s3);
1475
+ s3 = peg$parseconsumeSingleMore();
1476
+ }
1477
+ peg$savedPos = s0;
1478
+ s0 = peg$f33(s1, s2);
1479
+ } else {
1480
+ peg$currPos = s0;
1481
+ s0 = peg$FAILED;
1482
+ }
1483
+ return s0;
1484
+ }
1485
+ function peg$parseconsumeSingleMore() {
1486
+ let s0, s1, s2;
1487
+ s0 = peg$currPos;
1488
+ peg$savedPos = peg$currPos;
1489
+ s1 = peg$f34();
1490
+ if (s1) {
1491
+ s1 = undefined;
1492
+ } else {
1493
+ s1 = peg$FAILED;
1494
+ }
1495
+ if (s1 !== peg$FAILED) {
1496
+ if (input.length > peg$currPos) {
1497
+ s2 = input.charAt(peg$currPos);
1318
1498
  peg$currPos++;
1319
1499
  } else {
1320
- s3 = peg$FAILED;
1500
+ s2 = peg$FAILED;
1321
1501
  if (peg$silentFails === 0) {
1322
- peg$fail(peg$e8);
1502
+ peg$fail(peg$e6);
1323
1503
  }
1324
1504
  }
1325
- if (s3 !== peg$FAILED) {
1326
- while (s3 !== peg$FAILED) {
1327
- s2.push(s3);
1328
- s3 = input.charAt(peg$currPos);
1329
- if (peg$r3.test(s3)) {
1330
- peg$currPos++;
1331
- } else {
1332
- s3 = peg$FAILED;
1333
- if (peg$silentFails === 0) {
1334
- peg$fail(peg$e8);
1335
- }
1336
- }
1337
- }
1505
+ if (s2 !== peg$FAILED) {
1506
+ peg$savedPos = s0;
1507
+ s0 = peg$f35(s2);
1508
+ } else {
1509
+ peg$currPos = s0;
1510
+ s0 = peg$FAILED;
1511
+ }
1512
+ } else {
1513
+ peg$currPos = s0;
1514
+ s0 = peg$FAILED;
1515
+ }
1516
+ return s0;
1517
+ }
1518
+ function peg$parsebacktickQuotedUniversal() {
1519
+ let s0, s1, s2, s3;
1520
+ s0 = peg$currPos;
1521
+ s1 = peg$currPos;
1522
+ peg$silentFails++;
1523
+ if (input.charCodeAt(peg$currPos) === 96) {
1524
+ s2 = peg$c5;
1525
+ peg$currPos++;
1526
+ } else {
1527
+ s2 = peg$FAILED;
1528
+ if (peg$silentFails === 0) {
1529
+ peg$fail(peg$e8);
1530
+ }
1531
+ }
1532
+ peg$silentFails--;
1533
+ if (s2 !== peg$FAILED) {
1534
+ peg$currPos = s1;
1535
+ s1 = undefined;
1536
+ } else {
1537
+ s1 = peg$FAILED;
1538
+ }
1539
+ if (s1 !== peg$FAILED) {
1540
+ peg$savedPos = peg$currPos;
1541
+ s2 = peg$f36();
1542
+ if (s2) {
1543
+ s2 = undefined;
1338
1544
  } else {
1339
1545
  s2 = peg$FAILED;
1340
1546
  }
1341
1547
  if (s2 !== peg$FAILED) {
1342
- if (input.charCodeAt(peg$currPos) === 39) {
1343
- s3 = peg$c4;
1344
- peg$currPos++;
1345
- } else {
1346
- s3 = peg$FAILED;
1347
- if (peg$silentFails === 0) {
1348
- peg$fail(peg$e7);
1349
- }
1350
- }
1548
+ s3 = peg$parseconsumeBacktick();
1351
1549
  if (s3 !== peg$FAILED) {
1352
1550
  peg$savedPos = s0;
1353
- s0 = peg$f27(s2);
1551
+ s0 = peg$f37(s3);
1354
1552
  } else {
1355
1553
  peg$currPos = s0;
1356
1554
  s0 = peg$FAILED;
@@ -1365,12 +1563,72 @@ function peg$parse(input, options) {
1365
1563
  }
1366
1564
  return s0;
1367
1565
  }
1566
+ function peg$parseconsumeBacktick() {
1567
+ let s0, s1, s2, s3;
1568
+ s0 = peg$currPos;
1569
+ if (input.length > peg$currPos) {
1570
+ s1 = input.charAt(peg$currPos);
1571
+ peg$currPos++;
1572
+ } else {
1573
+ s1 = peg$FAILED;
1574
+ if (peg$silentFails === 0) {
1575
+ peg$fail(peg$e6);
1576
+ }
1577
+ }
1578
+ if (s1 !== peg$FAILED) {
1579
+ s2 = [];
1580
+ s3 = peg$parseconsumeBacktickMore();
1581
+ while (s3 !== peg$FAILED) {
1582
+ s2.push(s3);
1583
+ s3 = peg$parseconsumeBacktickMore();
1584
+ }
1585
+ peg$savedPos = s0;
1586
+ s0 = peg$f38(s1, s2);
1587
+ } else {
1588
+ peg$currPos = s0;
1589
+ s0 = peg$FAILED;
1590
+ }
1591
+ return s0;
1592
+ }
1593
+ function peg$parseconsumeBacktickMore() {
1594
+ let s0, s1, s2;
1595
+ s0 = peg$currPos;
1596
+ peg$savedPos = peg$currPos;
1597
+ s1 = peg$f39();
1598
+ if (s1) {
1599
+ s1 = undefined;
1600
+ } else {
1601
+ s1 = peg$FAILED;
1602
+ }
1603
+ if (s1 !== peg$FAILED) {
1604
+ if (input.length > peg$currPos) {
1605
+ s2 = input.charAt(peg$currPos);
1606
+ peg$currPos++;
1607
+ } else {
1608
+ s2 = peg$FAILED;
1609
+ if (peg$silentFails === 0) {
1610
+ peg$fail(peg$e6);
1611
+ }
1612
+ }
1613
+ if (s2 !== peg$FAILED) {
1614
+ peg$savedPos = s0;
1615
+ s0 = peg$f40(s2);
1616
+ } else {
1617
+ peg$currPos = s0;
1618
+ s0 = peg$FAILED;
1619
+ }
1620
+ } else {
1621
+ peg$currPos = s0;
1622
+ s0 = peg$FAILED;
1623
+ }
1624
+ return s0;
1625
+ }
1368
1626
  function peg$parseSET_BASE_INDENTATION() {
1369
1627
  let s0, s1, s2;
1370
1628
  s0 = peg$currPos;
1371
1629
  s1 = [];
1372
1630
  if (input.charCodeAt(peg$currPos) === 32) {
1373
- s2 = peg$c5;
1631
+ s2 = peg$c6;
1374
1632
  peg$currPos++;
1375
1633
  } else {
1376
1634
  s2 = peg$FAILED;
@@ -1381,7 +1639,7 @@ function peg$parse(input, options) {
1381
1639
  while (s2 !== peg$FAILED) {
1382
1640
  s1.push(s2);
1383
1641
  if (input.charCodeAt(peg$currPos) === 32) {
1384
- s2 = peg$c5;
1642
+ s2 = peg$c6;
1385
1643
  peg$currPos++;
1386
1644
  } else {
1387
1645
  s2 = peg$FAILED;
@@ -1391,7 +1649,7 @@ function peg$parse(input, options) {
1391
1649
  }
1392
1650
  }
1393
1651
  peg$savedPos = s0;
1394
- s1 = peg$f28(s1);
1652
+ s1 = peg$f41(s1);
1395
1653
  s0 = s1;
1396
1654
  return s0;
1397
1655
  }
@@ -1400,7 +1658,7 @@ function peg$parse(input, options) {
1400
1658
  s0 = peg$currPos;
1401
1659
  s1 = [];
1402
1660
  if (input.charCodeAt(peg$currPos) === 32) {
1403
- s2 = peg$c5;
1661
+ s2 = peg$c6;
1404
1662
  peg$currPos++;
1405
1663
  } else {
1406
1664
  s2 = peg$FAILED;
@@ -1411,7 +1669,7 @@ function peg$parse(input, options) {
1411
1669
  while (s2 !== peg$FAILED) {
1412
1670
  s1.push(s2);
1413
1671
  if (input.charCodeAt(peg$currPos) === 32) {
1414
- s2 = peg$c5;
1672
+ s2 = peg$c6;
1415
1673
  peg$currPos++;
1416
1674
  } else {
1417
1675
  s2 = peg$FAILED;
@@ -1421,7 +1679,7 @@ function peg$parse(input, options) {
1421
1679
  }
1422
1680
  }
1423
1681
  peg$savedPos = peg$currPos;
1424
- s2 = peg$f29(s1);
1682
+ s2 = peg$f42(s1);
1425
1683
  if (s2) {
1426
1684
  s2 = undefined;
1427
1685
  } else {
@@ -1429,7 +1687,7 @@ function peg$parse(input, options) {
1429
1687
  }
1430
1688
  if (s2 !== peg$FAILED) {
1431
1689
  peg$savedPos = s0;
1432
- s0 = peg$f30(s1);
1690
+ s0 = peg$f43(s1);
1433
1691
  } else {
1434
1692
  peg$currPos = s0;
1435
1693
  s0 = peg$FAILED;
@@ -1441,7 +1699,7 @@ function peg$parse(input, options) {
1441
1699
  s0 = peg$currPos;
1442
1700
  s1 = [];
1443
1701
  if (input.charCodeAt(peg$currPos) === 32) {
1444
- s2 = peg$c5;
1702
+ s2 = peg$c6;
1445
1703
  peg$currPos++;
1446
1704
  } else {
1447
1705
  s2 = peg$FAILED;
@@ -1452,7 +1710,7 @@ function peg$parse(input, options) {
1452
1710
  while (s2 !== peg$FAILED) {
1453
1711
  s1.push(s2);
1454
1712
  if (input.charCodeAt(peg$currPos) === 32) {
1455
- s2 = peg$c5;
1713
+ s2 = peg$c6;
1456
1714
  peg$currPos++;
1457
1715
  } else {
1458
1716
  s2 = peg$FAILED;
@@ -1462,7 +1720,7 @@ function peg$parse(input, options) {
1462
1720
  }
1463
1721
  }
1464
1722
  peg$savedPos = peg$currPos;
1465
- s2 = peg$f31(s1);
1723
+ s2 = peg$f44(s1);
1466
1724
  if (s2) {
1467
1725
  s2 = undefined;
1468
1726
  } else {
@@ -1529,7 +1787,7 @@ function peg$parse(input, options) {
1529
1787
  } else {
1530
1788
  s1 = peg$FAILED;
1531
1789
  if (peg$silentFails === 0) {
1532
- peg$fail(peg$e10);
1790
+ peg$fail(peg$e6);
1533
1791
  }
1534
1792
  }
1535
1793
  peg$silentFails--;
@@ -1580,12 +1838,12 @@ function peg$parse(input, options) {
1580
1838
  function peg$parsewhiteSpaceSymbol() {
1581
1839
  let s0;
1582
1840
  s0 = input.charAt(peg$currPos);
1583
- if (peg$r4.test(s0)) {
1841
+ if (peg$r2.test(s0)) {
1584
1842
  peg$currPos++;
1585
1843
  } else {
1586
1844
  s0 = peg$FAILED;
1587
1845
  if (peg$silentFails === 0) {
1588
- peg$fail(peg$e11);
1846
+ peg$fail(peg$e10);
1589
1847
  }
1590
1848
  }
1591
1849
  return s0;
@@ -1593,12 +1851,12 @@ function peg$parse(input, options) {
1593
1851
  function peg$parsereferenceSymbol() {
1594
1852
  let s0;
1595
1853
  s0 = input.charAt(peg$currPos);
1596
- if (peg$r5.test(s0)) {
1854
+ if (peg$r3.test(s0)) {
1597
1855
  peg$currPos++;
1598
1856
  } else {
1599
1857
  s0 = peg$FAILED;
1600
1858
  if (peg$silentFails === 0) {
1601
- peg$fail(peg$e12);
1859
+ peg$fail(peg$e11);
1602
1860
  }
1603
1861
  }
1604
1862
  return s0;
@@ -1632,6 +1890,41 @@ function peg$parse(input, options) {
1632
1890
  function getCurrentIndentation() {
1633
1891
  return indentationStack[indentationStack.length - 1];
1634
1892
  }
1893
+ function parseQuotedStringAt(inputStr, startPos, quoteChar) {
1894
+ if (startPos >= inputStr.length || inputStr[startPos] !== quoteChar) {
1895
+ return null;
1896
+ }
1897
+ let quoteCount = 0;
1898
+ let pos = startPos;
1899
+ while (pos < inputStr.length && inputStr[pos] === quoteChar) {
1900
+ quoteCount++;
1901
+ pos++;
1902
+ }
1903
+ const closeSeq = quoteChar.repeat(quoteCount);
1904
+ const escapeSeq = quoteChar.repeat(quoteCount * 2);
1905
+ let content = "";
1906
+ while (pos < inputStr.length) {
1907
+ if (inputStr.substr(pos, escapeSeq.length) === escapeSeq) {
1908
+ content += closeSeq;
1909
+ pos += escapeSeq.length;
1910
+ continue;
1911
+ }
1912
+ if (inputStr.substr(pos, quoteCount) === closeSeq) {
1913
+ const afterClose = pos + quoteCount;
1914
+ if (afterClose >= inputStr.length || inputStr[afterClose] !== quoteChar) {
1915
+ return {
1916
+ value: content,
1917
+ length: afterClose - startPos
1918
+ };
1919
+ }
1920
+ }
1921
+ content += inputStr[pos];
1922
+ pos++;
1923
+ }
1924
+ return null;
1925
+ }
1926
+ let parsedValue = null;
1927
+ let parsedLength = 0;
1635
1928
  peg$result = peg$startRuleFunction();
1636
1929
  const peg$success = peg$result !== peg$FAILED && peg$currPos === input.length;
1637
1930
  function peg$throw() {