skir 0.0.3 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/casing.d.ts.map +1 -1
  2. package/dist/casing.js +4 -1
  3. package/dist/casing.js.map +1 -1
  4. package/dist/casing.test.js +35 -1
  5. package/dist/casing.test.js.map +1 -1
  6. package/dist/compatibility_checker.test.js +2 -2
  7. package/dist/compiler.js +23 -42
  8. package/dist/compiler.js.map +1 -1
  9. package/dist/config.d.ts +2 -2
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/config.js +5 -10
  12. package/dist/config.js.map +1 -1
  13. package/dist/config_parser.d.ts +25 -0
  14. package/dist/config_parser.d.ts.map +1 -0
  15. package/dist/config_parser.js +125 -0
  16. package/dist/config_parser.js.map +1 -0
  17. package/dist/config_parser.test.d.ts +2 -0
  18. package/dist/config_parser.test.d.ts.map +1 -0
  19. package/dist/config_parser.test.js +386 -0
  20. package/dist/config_parser.test.js.map +1 -0
  21. package/dist/doc_comment_parser.d.ts +3 -2
  22. package/dist/doc_comment_parser.d.ts.map +1 -1
  23. package/dist/doc_comment_parser.js +67 -52
  24. package/dist/doc_comment_parser.js.map +1 -1
  25. package/dist/doc_comment_parser.test.js +86 -154
  26. package/dist/doc_comment_parser.test.js.map +1 -1
  27. package/dist/error_renderer.d.ts +4 -0
  28. package/dist/error_renderer.d.ts.map +1 -1
  29. package/dist/error_renderer.js +21 -0
  30. package/dist/error_renderer.js.map +1 -1
  31. package/dist/module_set.d.ts.map +1 -1
  32. package/dist/module_set.js +29 -12
  33. package/dist/module_set.js.map +1 -1
  34. package/dist/module_set.test.js +318 -173
  35. package/dist/module_set.test.js.map +1 -1
  36. package/dist/parser.d.ts.map +1 -1
  37. package/dist/parser.js +10 -10
  38. package/dist/parser.js.map +1 -1
  39. package/dist/project_initializer.js +9 -1
  40. package/dist/project_initializer.js.map +1 -1
  41. package/dist/tokenizer.d.ts +7 -1
  42. package/dist/tokenizer.d.ts.map +1 -1
  43. package/dist/tokenizer.js +12 -0
  44. package/dist/tokenizer.js.map +1 -1
  45. package/package.json +10 -5
  46. package/src/casing.ts +6 -1
  47. package/src/compiler.ts +26 -40
  48. package/src/config.ts +10 -15
  49. package/src/config_parser.ts +169 -0
  50. package/src/doc_comment_parser.ts +76 -52
  51. package/src/error_renderer.ts +34 -0
  52. package/src/module_set.ts +31 -15
  53. package/src/parser.ts +16 -10
  54. package/src/project_initializer.ts +9 -1
  55. package/src/tokenizer.ts +20 -2
  56. package/dist/language_server.d.ts +0 -15
  57. package/dist/language_server.d.ts.map +0 -1
  58. package/dist/language_server.js +0 -248
  59. package/dist/language_server.js.map +0 -1
  60. package/src/language_server.ts +0 -301
@@ -1,5 +1,5 @@
1
1
  import { expect } from "buckwheat";
2
- import { describe, it } from "mocha";
2
+ import { describe, it } from "node:test";
3
3
  import { ModuleSet } from "./module_set.js";
4
4
  class FakeFileReader {
5
5
  constructor() {
@@ -1346,27 +1346,39 @@ describe("module set", () => {
1346
1346
  `);
1347
1347
  const moduleSet = ModuleSet.create(fakeFileReader, "path/to/root");
1348
1348
  const actual = moduleSet.parseAndResolve("module");
1349
- const fooRecord = actual.result?.records.find((r) => r.record?.name.text === "Foo");
1350
- expect(fooRecord).toMatch({
1351
- record: {
1352
- name: { text: "Foo" },
1353
- doc: {
1354
- pieces: [
1355
- { kind: "text", text: "Hello " },
1356
- {
1357
- kind: "reference",
1358
- nameChain: [{ text: "Bar" }, { text: "OK" }],
1359
- referee: {
1360
- kind: "field",
1361
- field: { name: { text: "OK" } },
1362
- record: { name: { text: "Bar" } },
1363
- },
1349
+ expect(actual).toMatch({
1350
+ result: {
1351
+ nameToDeclaration: {
1352
+ Foo: {
1353
+ name: { text: "Foo" },
1354
+ doc: {
1355
+ pieces: [
1356
+ { kind: "text", text: "Hello " },
1357
+ {
1358
+ kind: "reference",
1359
+ nameParts: [
1360
+ {
1361
+ token: { text: "Bar" },
1362
+ declaration: { kind: "record", name: { text: "Bar" } },
1363
+ },
1364
+ {
1365
+ token: { text: "OK" },
1366
+ declaration: { kind: "field", name: { text: "OK" } },
1367
+ },
1368
+ ],
1369
+ referee: {
1370
+ kind: "field",
1371
+ field: { name: { text: "OK" } },
1372
+ record: { name: { text: "Bar" } },
1373
+ },
1374
+ },
1375
+ ],
1364
1376
  },
1365
- ],
1377
+ },
1366
1378
  },
1367
1379
  },
1380
+ errors: [],
1368
1381
  });
1369
- expect(actual.errors).toMatch([]);
1370
1382
  });
1371
1383
  it("resolves reference to sibling field", () => {
1372
1384
  const fakeFileReader = new FakeFileReader();
@@ -1393,7 +1405,15 @@ describe("module set", () => {
1393
1405
  { kind: "text", text: "Must be different from " },
1394
1406
  {
1395
1407
  kind: "reference",
1396
- nameChain: [{ text: "x" }],
1408
+ nameParts: [
1409
+ {
1410
+ token: { text: "x" },
1411
+ declaration: {
1412
+ kind: "field",
1413
+ name: { text: "x" },
1414
+ },
1415
+ },
1416
+ ],
1397
1417
  referee: {
1398
1418
  kind: "field",
1399
1419
  field: { name: { text: "x" } },
@@ -1423,24 +1443,32 @@ describe("module set", () => {
1423
1443
  `);
1424
1444
  const moduleSet = ModuleSet.create(fakeFileReader, "path/to/root");
1425
1445
  const actual = moduleSet.parseAndResolve("module");
1426
- const fooRecord = actual.result?.records.find((r) => r.record?.name.text === "Foo");
1427
- expect(fooRecord).toMatch({
1428
- record: {
1429
- name: { text: "Foo" },
1430
- doc: {
1431
- pieces: [
1432
- { kind: "text", text: "See " },
1433
- {
1434
- kind: "reference",
1435
- nameChain: [{ text: "Bar" }],
1436
- referee: { kind: "record", name: { text: "Bar" } },
1446
+ expect(actual).toMatch({
1447
+ result: {
1448
+ nameToDeclaration: {
1449
+ Foo: {
1450
+ name: { text: "Foo" },
1451
+ doc: {
1452
+ pieces: [
1453
+ { kind: "text", text: "See " },
1454
+ {
1455
+ kind: "reference",
1456
+ nameParts: [
1457
+ {
1458
+ token: { text: "Bar" },
1459
+ declaration: { kind: "record", name: { text: "Bar" } },
1460
+ },
1461
+ ],
1462
+ referee: { kind: "record", name: { text: "Bar" } },
1463
+ },
1464
+ { kind: "text", text: " for details" },
1465
+ ],
1437
1466
  },
1438
- { kind: "text", text: " for details" },
1439
- ],
1467
+ },
1440
1468
  },
1441
1469
  },
1470
+ errors: [],
1442
1471
  });
1443
- expect(actual.errors).toMatch([]);
1444
1472
  });
1445
1473
  it("resolves reference to nested record", () => {
1446
1474
  const fakeFileReader = new FakeFileReader();
@@ -1456,23 +1484,41 @@ describe("module set", () => {
1456
1484
  `);
1457
1485
  const moduleSet = ModuleSet.create(fakeFileReader, "path/to/root");
1458
1486
  const actual = moduleSet.parseAndResolve("module");
1459
- const fooRecord = actual.result?.records.find((r) => r.record?.name.text === "Foo");
1460
- expect(fooRecord).toMatch({
1461
- record: {
1462
- name: { text: "Foo" },
1463
- doc: {
1464
- pieces: [
1465
- { kind: "text", text: "Uses " },
1466
- {
1467
- kind: "reference",
1468
- nameChain: [{ text: "Outer" }, { text: "Inner" }],
1469
- referee: { kind: "record", name: { text: "Inner" } },
1487
+ expect(actual).toMatch({
1488
+ result: {
1489
+ nameToDeclaration: {
1490
+ Foo: {
1491
+ name: { text: "Foo" },
1492
+ doc: {
1493
+ pieces: [
1494
+ { kind: "text", text: "Uses " },
1495
+ {
1496
+ kind: "reference",
1497
+ nameParts: [
1498
+ {
1499
+ token: { text: "Outer" },
1500
+ declaration: {
1501
+ kind: "record",
1502
+ name: { text: "Outer" },
1503
+ },
1504
+ },
1505
+ {
1506
+ token: { text: "Inner" },
1507
+ declaration: {
1508
+ kind: "record",
1509
+ name: { text: "Inner" },
1510
+ },
1511
+ },
1512
+ ],
1513
+ referee: { kind: "record", name: { text: "Inner" } },
1514
+ },
1515
+ ],
1470
1516
  },
1471
- ],
1517
+ },
1472
1518
  },
1473
1519
  },
1520
+ errors: [],
1474
1521
  });
1475
- expect(actual.errors).toMatch([]);
1476
1522
  });
1477
1523
  it("resolves absolute reference", () => {
1478
1524
  const fakeFileReader = new FakeFileReader();
@@ -1487,35 +1533,46 @@ describe("module set", () => {
1487
1533
  `);
1488
1534
  const moduleSet = ModuleSet.create(fakeFileReader, "path/to/root");
1489
1535
  const actual = moduleSet.parseAndResolve("module");
1490
- const outerRecord = actual.result?.records.find((r) => r.record?.name.text === "Outer");
1491
- expect(outerRecord).toMatch({
1492
- record: {
1493
- name: { text: "Outer" },
1494
- nestedRecords: [
1495
- {
1496
- name: { text: "Inner" },
1497
- doc: {
1498
- pieces: [
1499
- { kind: "text", text: "Reference to " },
1500
- {
1501
- kind: "reference",
1502
- absolute: true,
1503
- nameChain: [{ text: "Bar" }],
1504
- referee: {
1505
- kind: "record",
1506
- name: { text: "Bar", colNumber: 17 },
1507
- },
1536
+ expect(actual).toMatch({
1537
+ result: {
1538
+ nameToDeclaration: {
1539
+ Outer: {
1540
+ name: { text: "Outer" },
1541
+ nestedRecords: [
1542
+ {
1543
+ name: { text: "Inner" },
1544
+ doc: {
1545
+ pieces: [
1546
+ { kind: "text", text: "Reference to " },
1547
+ {
1548
+ kind: "reference",
1549
+ absolute: true,
1550
+ nameParts: [
1551
+ {
1552
+ token: { text: "Bar" },
1553
+ declaration: {
1554
+ kind: "record",
1555
+ name: { text: "Bar", colNumber: 17 },
1556
+ },
1557
+ },
1558
+ ],
1559
+ referee: {
1560
+ kind: "record",
1561
+ name: { text: "Bar", colNumber: 17 },
1562
+ },
1563
+ },
1564
+ ],
1508
1565
  },
1509
- ],
1510
- },
1511
- },
1512
- {
1513
- name: { text: "Bar", colNumber: 19 },
1566
+ },
1567
+ {
1568
+ name: { text: "Bar", colNumber: 19 },
1569
+ },
1570
+ ],
1514
1571
  },
1515
- ],
1572
+ },
1516
1573
  },
1574
+ errors: [],
1517
1575
  });
1518
- expect(actual.errors).toMatch([]);
1519
1576
  });
1520
1577
  it("resolves reference to method", () => {
1521
1578
  const fakeFileReader = new FakeFileReader();
@@ -1538,7 +1595,15 @@ describe("module set", () => {
1538
1595
  { kind: "text", text: "Calls " },
1539
1596
  {
1540
1597
  kind: "reference",
1541
- nameChain: [{ text: "GetData" }],
1598
+ nameParts: [
1599
+ {
1600
+ token: { text: "GetData" },
1601
+ declaration: {
1602
+ kind: "method",
1603
+ name: { text: "GetData" },
1604
+ },
1605
+ },
1606
+ ],
1542
1607
  referee: { kind: "method", name: { text: "GetData" } },
1543
1608
  },
1544
1609
  ],
@@ -1573,7 +1638,15 @@ describe("module set", () => {
1573
1638
  { kind: "text", text: "Default is " },
1574
1639
  {
1575
1640
  kind: "reference",
1576
- nameChain: [{ text: "DEFAULT_VALUE" }],
1641
+ nameParts: [
1642
+ {
1643
+ token: { text: "DEFAULT_VALUE" },
1644
+ declaration: {
1645
+ kind: "constant",
1646
+ name: { text: "DEFAULT_VALUE" },
1647
+ },
1648
+ },
1649
+ ],
1577
1650
  referee: {
1578
1651
  kind: "constant",
1579
1652
  name: { text: "DEFAULT_VALUE" },
@@ -1600,33 +1673,44 @@ describe("module set", () => {
1600
1673
  `);
1601
1674
  const moduleSet = ModuleSet.create(fakeFileReader, "path/to/root");
1602
1675
  const actual = moduleSet.parseAndResolve("module");
1603
- const fooRecord = actual.result?.records.find((r) => r.record?.name.text === "Foo");
1604
- expect(fooRecord).toMatch({
1605
- record: {
1606
- name: { text: "Foo" },
1607
- fields: [
1608
- {
1609
- name: { text: "bar" },
1610
- doc: {
1611
- pieces: [
1612
- { kind: "text", text: "Uses " },
1613
- {
1614
- kind: "reference",
1615
- nameChain: [{ text: "OK" }],
1616
- referee: {
1617
- kind: "field",
1618
- field: { name: { text: "OK" } },
1619
- record: { name: { text: "Bar" } },
1620
- },
1676
+ expect(actual).toMatch({
1677
+ result: {
1678
+ nameToDeclaration: {
1679
+ Foo: {
1680
+ name: { text: "Foo" },
1681
+ fields: [
1682
+ {
1683
+ name: { text: "bar" },
1684
+ doc: {
1685
+ pieces: [
1686
+ { kind: "text", text: "Uses " },
1687
+ {
1688
+ kind: "reference",
1689
+ nameParts: [
1690
+ {
1691
+ token: { text: "OK" },
1692
+ declaration: {
1693
+ kind: "field",
1694
+ name: { text: "OK" },
1695
+ },
1696
+ },
1697
+ ],
1698
+ referee: {
1699
+ kind: "field",
1700
+ field: { name: { text: "OK" } },
1701
+ record: { name: { text: "Bar" } },
1702
+ },
1703
+ },
1704
+ { kind: "text", text: " from the Bar enum" },
1705
+ ],
1621
1706
  },
1622
- { kind: "text", text: " from the Bar enum" },
1623
- ],
1624
- },
1707
+ },
1708
+ ],
1625
1709
  },
1626
- ],
1710
+ },
1627
1711
  },
1712
+ errors: [],
1628
1713
  });
1629
- expect(actual.errors).toMatch([]);
1630
1714
  });
1631
1715
  it("resolves reference from method request type scope", () => {
1632
1716
  const fakeFileReader = new FakeFileReader();
@@ -1652,7 +1736,12 @@ describe("module set", () => {
1652
1736
  { kind: "text", text: "Input " },
1653
1737
  {
1654
1738
  kind: "reference",
1655
- nameChain: [{ text: "x" }],
1739
+ nameParts: [
1740
+ {
1741
+ token: { text: "x" },
1742
+ declaration: { kind: "field", name: { text: "x" } },
1743
+ },
1744
+ ],
1656
1745
  referee: {
1657
1746
  kind: "field",
1658
1747
  field: { name: { text: "x" } },
@@ -1688,7 +1777,12 @@ describe("module set", () => {
1688
1777
  { kind: "text", text: "Default status is " },
1689
1778
  {
1690
1779
  kind: "reference",
1691
- nameChain: [{ text: "OK" }],
1780
+ nameParts: [
1781
+ {
1782
+ token: { text: "OK" },
1783
+ declaration: { kind: "field", name: { text: "OK" } },
1784
+ },
1785
+ ],
1692
1786
  referee: {
1693
1787
  kind: "field",
1694
1788
  field: { name: { text: "OK" } },
@@ -1714,29 +1808,42 @@ describe("module set", () => {
1714
1808
  `);
1715
1809
  const moduleSet = ModuleSet.create(fakeFileReader, "path/to/root");
1716
1810
  const actual = moduleSet.parseAndResolve("module");
1717
- const bazRecord = actual.result?.records.find((r) => r.record?.name.text === "Baz");
1718
- expect(bazRecord).toMatch({
1719
- record: {
1720
- name: { text: "Baz" },
1721
- doc: {
1722
- pieces: [
1723
- { kind: "text", text: "Compare " },
1724
- {
1725
- kind: "reference",
1726
- nameChain: [{ text: "Foo" }],
1727
- referee: { kind: "record", name: { text: "Foo" } },
1728
- },
1729
- { kind: "text", text: " and " },
1730
- {
1731
- kind: "reference",
1732
- nameChain: [{ text: "Bar" }],
1733
- referee: { kind: "record", name: { text: "Bar" } },
1811
+ expect(actual).toMatch({
1812
+ result: {
1813
+ nameToDeclaration: {
1814
+ Baz: {
1815
+ name: { text: "Baz" },
1816
+ doc: {
1817
+ pieces: [
1818
+ { kind: "text", text: "Compare " },
1819
+ {
1820
+ kind: "reference",
1821
+ nameParts: [
1822
+ {
1823
+ token: { text: "Foo" },
1824
+ declaration: { kind: "record", name: { text: "Foo" } },
1825
+ },
1826
+ ],
1827
+ referee: { kind: "record", name: { text: "Foo" } },
1828
+ },
1829
+ { kind: "text", text: " and " },
1830
+ {
1831
+ kind: "reference",
1832
+ nameParts: [
1833
+ {
1834
+ token: { text: "Bar" },
1835
+ declaration: { kind: "record", name: { text: "Bar" } },
1836
+ },
1837
+ ],
1838
+ referee: { kind: "record", name: { text: "Bar" } },
1839
+ },
1840
+ ],
1734
1841
  },
1735
- ],
1842
+ },
1736
1843
  },
1737
1844
  },
1845
+ errors: [],
1738
1846
  });
1739
- expect(actual.errors).toMatch([]);
1740
1847
  });
1741
1848
  it("resolves reference through import alias", () => {
1742
1849
  const fakeFileReader = new FakeFileReader();
@@ -1751,23 +1858,38 @@ describe("module set", () => {
1751
1858
  `);
1752
1859
  const moduleSet = ModuleSet.create(fakeFileReader, "path/to/root");
1753
1860
  const actual = moduleSet.parseAndResolve("module");
1754
- const barRecord = actual.result?.records.find((r) => r.record?.name.text === "Bar");
1755
- expect(barRecord).toMatch({
1756
- record: {
1757
- name: { text: "Bar" },
1758
- doc: {
1759
- pieces: [
1760
- { kind: "text", text: "Uses " },
1761
- {
1762
- kind: "reference",
1763
- nameChain: [{ text: "other" }, { text: "Foo" }],
1764
- referee: { kind: "record", name: { text: "Foo" } },
1861
+ expect(actual).toMatch({
1862
+ result: {
1863
+ nameToDeclaration: {
1864
+ Bar: {
1865
+ name: { text: "Bar" },
1866
+ doc: {
1867
+ pieces: [
1868
+ { kind: "text", text: "Uses " },
1869
+ {
1870
+ kind: "reference",
1871
+ nameParts: [
1872
+ {
1873
+ token: { text: "other" },
1874
+ declaration: {
1875
+ kind: "import-alias",
1876
+ name: { text: "other" },
1877
+ },
1878
+ },
1879
+ {
1880
+ token: { text: "Foo" },
1881
+ declaration: { kind: "record", name: { text: "Foo" } },
1882
+ },
1883
+ ],
1884
+ referee: { kind: "record", name: { text: "Foo" } },
1885
+ },
1886
+ ],
1765
1887
  },
1766
- ],
1888
+ },
1767
1889
  },
1768
1890
  },
1891
+ errors: [{ message: "Unused import alias" }],
1769
1892
  });
1770
- expect(actual.errors).toMatch([{ message: "Unused import alias" }]);
1771
1893
  });
1772
1894
  it("resolves reference through import", () => {
1773
1895
  const fakeFileReader = new FakeFileReader();
@@ -1782,23 +1904,38 @@ describe("module set", () => {
1782
1904
  `);
1783
1905
  const moduleSet = ModuleSet.create(fakeFileReader, "path/to/root");
1784
1906
  const actual = moduleSet.parseAndResolve("module");
1785
- const barRecord = actual.result?.records.find((r) => r.record?.name.text === "Bar");
1786
- expect(barRecord).toMatch({
1787
- record: {
1788
- name: { text: "Bar" },
1789
- doc: {
1790
- pieces: [
1791
- { kind: "text", text: "Uses " },
1792
- {
1793
- kind: "reference",
1794
- nameChain: [{ text: "other" }, { text: "Foo" }],
1795
- referee: { kind: "record", name: { text: "Foo" } },
1907
+ expect(actual).toMatch({
1908
+ result: {
1909
+ nameToDeclaration: {
1910
+ Bar: {
1911
+ name: { text: "Bar" },
1912
+ doc: {
1913
+ pieces: [
1914
+ { kind: "text", text: "Uses " },
1915
+ {
1916
+ kind: "reference",
1917
+ nameParts: [
1918
+ {
1919
+ token: { text: "other" },
1920
+ declaration: {
1921
+ kind: "import-alias",
1922
+ name: { text: "other" },
1923
+ },
1924
+ },
1925
+ {
1926
+ token: { text: "Foo" },
1927
+ declaration: { kind: "record", name: { text: "Foo" } },
1928
+ },
1929
+ ],
1930
+ referee: { kind: "record", name: { text: "Foo" } },
1931
+ },
1932
+ ],
1796
1933
  },
1797
- ],
1934
+ },
1798
1935
  },
1799
1936
  },
1937
+ errors: [{ message: "Unused import alias" }],
1800
1938
  });
1801
- expect(actual.errors).toMatch([{ message: "Unused import alias" }]);
1802
1939
  });
1803
1940
  it("reports error for unresolved reference", () => {
1804
1941
  const fakeFileReader = new FakeFileReader();
@@ -1853,42 +1990,50 @@ describe("module set", () => {
1853
1990
  `);
1854
1991
  const moduleSet = ModuleSet.create(fakeFileReader, "path/to/root");
1855
1992
  const actual = moduleSet.parseAndResolve("module");
1856
- // Find the Outer record
1857
- const outerRecord = actual.result?.records.find((r) => r.record.name.text === "Outer");
1858
- expect(outerRecord).toMatch({
1859
- record: {
1860
- name: { text: "Outer" },
1861
- nestedRecords: [
1862
- {
1863
- name: { text: "Inner" },
1864
- fields: [
1993
+ expect(actual).toMatch({
1994
+ result: {
1995
+ nameToDeclaration: {
1996
+ Outer: {
1997
+ name: { text: "Outer" },
1998
+ nestedRecords: [
1865
1999
  {
1866
- name: { text: "x" },
1867
- doc: {
1868
- pieces: [
1869
- { kind: "text", text: "Reference to " },
1870
- {
1871
- kind: "reference",
1872
- nameChain: [{ text: "Foo" }],
1873
- // Should resolve to Outer.Foo, not the top-level Foo
1874
- referee: {
1875
- kind: "record",
1876
- name: { text: "Foo" },
1877
- },
2000
+ name: { text: "Inner" },
2001
+ fields: [
2002
+ {
2003
+ name: { text: "x" },
2004
+ doc: {
2005
+ pieces: [
2006
+ { kind: "text", text: "Reference to " },
2007
+ {
2008
+ kind: "reference",
2009
+ nameParts: [
2010
+ {
2011
+ token: { text: "Foo" },
2012
+ declaration: {
2013
+ kind: "record",
2014
+ name: { text: "Foo" },
2015
+ },
2016
+ },
2017
+ ],
2018
+ // Should resolve to Outer.Foo, not the top-level Foo
2019
+ referee: {
2020
+ kind: "record",
2021
+ name: { text: "Foo" },
2022
+ },
2023
+ },
2024
+ { kind: "text", text: " (nested)" },
2025
+ ],
1878
2026
  },
1879
- { kind: "text", text: " (nested)" },
1880
- ],
1881
- },
2027
+ },
2028
+ ],
2029
+ },
2030
+ {
2031
+ name: { text: "Foo" },
1882
2032
  },
1883
2033
  ],
1884
2034
  },
1885
- {
1886
- name: { text: "Foo" },
1887
- },
1888
- ],
2035
+ },
1889
2036
  },
1890
- });
1891
- expect(actual).toMatch({
1892
2037
  errors: [],
1893
2038
  });
1894
2039
  });