mirror of
https://github.com/morluto/rea.git
synced 2026-10-28 18:35:53 +00: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:
1 parent
f88c99021b
commit
f998fcb1cc
5 files changed
+335
-4
No files matched your search
@@ -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