@suss/resolution 0.29.0 → 0.30.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.cjs +30 -0
- package/dist/index.js +30 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1430,6 +1430,28 @@ var RESOLUTION_RULES = [
|
|
|
1430
1430
|
(0, import_datalog4.lit)("contains", (0, import_datalog4.variable)("baseCls"), (0, import_datalog4.variable)("n"), (0, import_datalog4.variable)("held"))
|
|
1431
1431
|
]
|
|
1432
1432
|
),
|
|
1433
|
+
// An association is read off an instance as a property, and stating
|
|
1434
|
+
// it as `contains` is what puts it on the ancestry rule, so a concern
|
|
1435
|
+
// or a base class can be the one that declares it.
|
|
1436
|
+
(0, import_datalog4.rule)(
|
|
1437
|
+
"contains",
|
|
1438
|
+
[(0, import_datalog4.variable)("cls"), (0, import_datalog4.variable)("n"), (0, import_datalog4.variable)("t")],
|
|
1439
|
+
[(0, import_datalog4.lit)("declaresAssociation", (0, import_datalog4.variable)("cls"), (0, import_datalog4.variable)("n"), (0, import_datalog4.variable)("t"))],
|
|
1440
|
+
"declared association"
|
|
1441
|
+
),
|
|
1442
|
+
// The same, for a language that buries the declaration in an ordinary
|
|
1443
|
+
// assignment. Keying on the module the callable came from is what
|
|
1444
|
+
// keeps a project function spelled the same way out.
|
|
1445
|
+
(0, import_datalog4.rule)(
|
|
1446
|
+
"contains",
|
|
1447
|
+
[(0, import_datalog4.variable)("cls"), (0, import_datalog4.variable)("n"), (0, import_datalog4.variable)("t")],
|
|
1448
|
+
[
|
|
1449
|
+
(0, import_datalog4.lit)("fieldCall", (0, import_datalog4.variable)("cls"), (0, import_datalog4.variable)("n"), (0, import_datalog4.variable)("c"), (0, import_datalog4.variable)("t")),
|
|
1450
|
+
(0, import_datalog4.lit)("comesFrom", (0, import_datalog4.variable)("c"), (0, import_datalog4.variable)("m"), (0, import_datalog4.variable)("name")),
|
|
1451
|
+
(0, import_datalog4.lit)("associationConstructor", (0, import_datalog4.variable)("m"), (0, import_datalog4.variable)("name"))
|
|
1452
|
+
],
|
|
1453
|
+
"constructed association"
|
|
1454
|
+
),
|
|
1433
1455
|
// The library base a class's ancestry arrives at, however many of a
|
|
1434
1456
|
// project's own classes sit in between. A base the run declares has a
|
|
1435
1457
|
// node to keep walking from; one it does not has only a name.
|
|
@@ -1815,6 +1837,14 @@ var RESOLUTION_QUESTIONS = [
|
|
|
1815
1837
|
(0, import_datalog4.lit)("holdsProperty", (0, import_datalog4.variable)("b"), (0, import_datalog4.variable)("n"), (0, import_datalog4.variable)("held"))
|
|
1816
1838
|
]
|
|
1817
1839
|
),
|
|
1840
|
+
// A method the class gets under a name the source computes rather than
|
|
1841
|
+
// writes out. The adapter settles the name against the same facts and
|
|
1842
|
+
// says so, and the chain reports it beside the ones written out.
|
|
1843
|
+
(0, import_datalog4.rule)(
|
|
1844
|
+
"wantedDeclaredName",
|
|
1845
|
+
[(0, import_datalog4.variable)("c"), (0, import_datalog4.variable)("n")],
|
|
1846
|
+
[(0, import_datalog4.lit)("ancestryChain", (0, import_datalog4.variable)("c"), (0, import_datalog4.variable)("b")), (0, import_datalog4.lit)("declaresName", (0, import_datalog4.variable)("b"), (0, import_datalog4.variable)("n"))]
|
|
1847
|
+
),
|
|
1818
1848
|
(0, import_datalog4.rule)("anchorChain", [(0, import_datalog4.variable)("x"), (0, import_datalog4.variable)("x")], [(0, import_datalog4.lit)("wantedAnchor", (0, import_datalog4.variable)("x"))]),
|
|
1819
1849
|
(0, import_datalog4.rule)(
|
|
1820
1850
|
"anchorChain",
|
package/dist/index.js
CHANGED
|
@@ -1375,6 +1375,28 @@ var RESOLUTION_RULES = [
|
|
|
1375
1375
|
lit("contains", v("baseCls"), v("n"), v("held"))
|
|
1376
1376
|
]
|
|
1377
1377
|
),
|
|
1378
|
+
// An association is read off an instance as a property, and stating
|
|
1379
|
+
// it as `contains` is what puts it on the ancestry rule, so a concern
|
|
1380
|
+
// or a base class can be the one that declares it.
|
|
1381
|
+
rule(
|
|
1382
|
+
"contains",
|
|
1383
|
+
[v("cls"), v("n"), v("t")],
|
|
1384
|
+
[lit("declaresAssociation", v("cls"), v("n"), v("t"))],
|
|
1385
|
+
"declared association"
|
|
1386
|
+
),
|
|
1387
|
+
// The same, for a language that buries the declaration in an ordinary
|
|
1388
|
+
// assignment. Keying on the module the callable came from is what
|
|
1389
|
+
// keeps a project function spelled the same way out.
|
|
1390
|
+
rule(
|
|
1391
|
+
"contains",
|
|
1392
|
+
[v("cls"), v("n"), v("t")],
|
|
1393
|
+
[
|
|
1394
|
+
lit("fieldCall", v("cls"), v("n"), v("c"), v("t")),
|
|
1395
|
+
lit("comesFrom", v("c"), v("m"), v("name")),
|
|
1396
|
+
lit("associationConstructor", v("m"), v("name"))
|
|
1397
|
+
],
|
|
1398
|
+
"constructed association"
|
|
1399
|
+
),
|
|
1378
1400
|
// The library base a class's ancestry arrives at, however many of a
|
|
1379
1401
|
// project's own classes sit in between. A base the run declares has a
|
|
1380
1402
|
// node to keep walking from; one it does not has only a name.
|
|
@@ -1760,6 +1782,14 @@ var RESOLUTION_QUESTIONS = [
|
|
|
1760
1782
|
lit("holdsProperty", v("b"), v("n"), v("held"))
|
|
1761
1783
|
]
|
|
1762
1784
|
),
|
|
1785
|
+
// A method the class gets under a name the source computes rather than
|
|
1786
|
+
// writes out. The adapter settles the name against the same facts and
|
|
1787
|
+
// says so, and the chain reports it beside the ones written out.
|
|
1788
|
+
rule(
|
|
1789
|
+
"wantedDeclaredName",
|
|
1790
|
+
[v("c"), v("n")],
|
|
1791
|
+
[lit("ancestryChain", v("c"), v("b")), lit("declaresName", v("b"), v("n"))]
|
|
1792
|
+
),
|
|
1763
1793
|
rule("anchorChain", [v("x"), v("x")], [lit("wantedAnchor", v("x"))]),
|
|
1764
1794
|
rule(
|
|
1765
1795
|
"anchorChain",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suss/resolution",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The rules suss uses to follow a name in TypeScript, Python or Ruby to the function it comes down to.",
|
|
6
6
|
"keywords": [
|
|
@@ -56,6 +56,6 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@suss/datalog": "0.
|
|
59
|
+
"@suss/datalog": "0.30.0"
|
|
60
60
|
}
|
|
61
61
|
}
|