@suss/adapter-ruby 0.5.0 → 0.5.2
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 +11 -1
- package/dist/index.js +11 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -677,6 +677,16 @@ var LITERAL_ARGS = {
|
|
|
677
677
|
function children(node) {
|
|
678
678
|
return node.namedChildren.filter((child) => child !== null);
|
|
679
679
|
}
|
|
680
|
+
function withoutChainLinks(calls) {
|
|
681
|
+
const isLink = /* @__PURE__ */ new Set();
|
|
682
|
+
for (const call of calls) {
|
|
683
|
+
const receiver = field(call, "receiver");
|
|
684
|
+
if (receiver !== null && receiver.type === "call") {
|
|
685
|
+
isLink.add(receiver.id);
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
return calls.filter((call) => !isLink.has(call.id));
|
|
689
|
+
}
|
|
680
690
|
function isPropertyRead(node) {
|
|
681
691
|
return field(node, "receiver") !== null && field(node, "arguments") === null;
|
|
682
692
|
}
|
|
@@ -738,7 +748,7 @@ function invocationEffects(definitionNode) {
|
|
|
738
748
|
if (body === null) {
|
|
739
749
|
return [];
|
|
740
750
|
}
|
|
741
|
-
const calls = bodyCalls(body);
|
|
751
|
+
const calls = withoutChainLinks(bodyCalls(body));
|
|
742
752
|
if (calls.length === 0) {
|
|
743
753
|
return [];
|
|
744
754
|
}
|
package/dist/index.js
CHANGED
|
@@ -626,6 +626,16 @@ var LITERAL_ARGS = {
|
|
|
626
626
|
function children(node) {
|
|
627
627
|
return node.namedChildren.filter((child) => child !== null);
|
|
628
628
|
}
|
|
629
|
+
function withoutChainLinks(calls) {
|
|
630
|
+
const isLink = /* @__PURE__ */ new Set();
|
|
631
|
+
for (const call of calls) {
|
|
632
|
+
const receiver = field(call, "receiver");
|
|
633
|
+
if (receiver !== null && receiver.type === "call") {
|
|
634
|
+
isLink.add(receiver.id);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
return calls.filter((call) => !isLink.has(call.id));
|
|
638
|
+
}
|
|
629
639
|
function isPropertyRead(node) {
|
|
630
640
|
return field(node, "receiver") !== null && field(node, "arguments") === null;
|
|
631
641
|
}
|
|
@@ -687,7 +697,7 @@ function invocationEffects(definitionNode) {
|
|
|
687
697
|
if (body === null) {
|
|
688
698
|
return [];
|
|
689
699
|
}
|
|
690
|
-
const calls = bodyCalls(body);
|
|
700
|
+
const calls = withoutChainLinks(bodyCalls(body));
|
|
691
701
|
if (calls.length === 0) {
|
|
692
702
|
return [];
|
|
693
703
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suss/adapter-ruby",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Ruby language adapter for suss, parsing source with tree-sitter (WASM), resolving constant nesting with a lexical binder, and emitting raw extractions for the suss pipeline.",
|
|
6
6
|
"keywords": [
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"typecheck": "tsc --noEmit"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@suss/behavioral-ir": "0.5.
|
|
51
|
-
"@suss/datalog": "0.5.
|
|
52
|
-
"@suss/extractor": "0.5.
|
|
50
|
+
"@suss/behavioral-ir": "0.5.2",
|
|
51
|
+
"@suss/datalog": "0.5.2",
|
|
52
|
+
"@suss/extractor": "0.5.2",
|
|
53
53
|
"web-tree-sitter": "^0.26.11"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|