mirror of
https://github.com/morluto/rea
synced 2026-10-27 22:45:19 -04:00
fix(reference-source): respect require bindings
Reuse lexical ownership to exclude shadowed require calls while retaining native CommonJS and direct createRequire bindings. Preserve candidate edges when JavaScript or TypeScript runtime mode is unknown. Co-authored-by: Rudy Celekli <rudy@gradiahq.com>
This commit is contained in:
@@ -89,6 +89,10 @@ export const semanticScopeId = (
|
||||
): string =>
|
||||
`scope:${kind}:${String(node.start ?? -1)}:${String(node.end ?? -1)}`;
|
||||
|
||||
/** Create the canonical identity used by one binding in a lexical scope. */
|
||||
export const semanticBindingId = (scopeId: string, name: string): string =>
|
||||
`${scopeId}:binding:${encodeURIComponent(name)}`;
|
||||
|
||||
/** Resolve one lexical name from the scope containing a node. */
|
||||
export const resolveSemanticBindingState = (
|
||||
state: JavaScriptSemanticAnalysisState,
|
||||
|
||||
Reference in New Issue
Block a user