Documentation
¶
Overview ¶
Package scip maps a SCIP index (produced by scip-typescript) into codegraph CALLS edges. SCIP gives type-checker-resolved reference occurrences; we turn each into a caller->callee edge by mapping symbols to our node qualified names and attributing each call site to the function/method that encloses it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallEdges ¶
CallEdges turns SCIP reference occurrences into CALLS edges: callee = the type-checker-resolved referenced symbol, caller = the function/method enclosing the reference. Only references (not definitions) to invocable symbols count. Edges whose endpoints don't map are skipped; the store drops any that don't resolve to real nodes (honest precision).
func RunAndRead ¶
RunAndRead runs scip-typescript in dir (which must hold a tsconfig.json and installed node_modules), writes the index to outPath, and reads it back. It is best-effort: callers treat an error as "no TS calls resolved this run".
Types ¶
type Enclosing ¶
Enclosing maps a call-site (repo-relative file + 1-based line) to the qualified name of the function/method that contains it — i.e. the caller — and reports whether a qualified name is a known call target.
type EnclosingNodes ¶
type EnclosingNodes struct {
// contains filtered or unexported fields
}
EnclosingNodes is an Enclosing built from graph nodes: for a (file, line) it returns the innermost Function/Method node whose line span contains it, and tracks all Function/Method QNs as the set of valid call targets.
func BuildEnclosing ¶
func BuildEnclosing(nodes []graph.Node) *EnclosingNodes
BuildEnclosing indexes Function/Method nodes by file for caller lookup and by QN for callee validation.
func (*EnclosingNodes) Has ¶
func (e *EnclosingNodes) Has(qn string) bool
Has reports whether qn is a known function/method node (a valid call target).