mirror of
https://github.com/morluto/rea.git
synced 2026-10-28 02:15:44 +00:00
fix(javascript): preserve semantic uncertainty and lexical ownership
This commit is contained in:
1 parent
9fe54c4073
commit
896696b2e7
16 files changed
+525
-20
No files matched your search
@@ -250,11 +250,24 @@ const relevantUnknownFrontiers = (
|
||||
return graph.unknowns.filter(
|
||||
(unknown) =>
|
||||
(unknown.node_id === null || nodeIds.has(unknown.node_id)) &&
|
||||
(allowed === null ||
|
||||
unknown.relation_kinds.some((relation) => allowed.has(relation))),
|
||||
unknown.relation_kinds.some(
|
||||
(relation) =>
|
||||
directionAllowsRelation(input.direction, relation) &&
|
||||
(allowed === null || allowed.has(relation)),
|
||||
),
|
||||
);
|
||||
};
|
||||
|
||||
const directionAllowsRelation = (
|
||||
direction: JavaScriptSemanticQueryInput["direction"],
|
||||
relation: JavaScriptSemanticGraphRelation["relation"],
|
||||
): boolean =>
|
||||
direction === "callers"
|
||||
? relation === "calls"
|
||||
: direction === "ownership"
|
||||
? ownershipRelation(relation)
|
||||
: true;
|
||||
|
||||
const relevantCandidateRelationCount = (
|
||||
graph: JavaScriptSemanticGraph,
|
||||
nodeIds: ReadonlySet<string>,
|
||||
|
||||
Reference in new issue
Block a user