Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ParseResult ¶
ParseResult is the per-file output of Pass 1.
type Parser ¶
type Parser interface {
// ParseFile runs Pass 1 on a single file. Pure function — must be safe
// to call concurrently from a worker pool.
ParseFile(path string, src []byte) (*ParseResult, error)
// Resolve runs Pass 2 over the union of ParseResults from the same language.
Resolve(results []*ParseResult) (*ResolvedGraph, error)
// Extensions reports the file extensions this parser handles (lowercase, with leading ".").
Extensions() []string
}
Parser is the contract every language parser implements.
type PendingRef ¶
type PendingRef struct {
SrcID string
EdgeType types.EdgeType
TargetQName string
HintFile string
Line int
// ByteOffset (W-C W6 V2.15, 2026-05-15): byte position of the
// referent in the source file. Used by the Solidity resolver to
// disambiguate same-line shadow scopes — when V2.0's line-only
// `declLine <= useSiteLine <= scopeEndLine` filter admits multiple
// decls, the byte offset breaks the tie via containment. Zero =
// unset (other parsers leave it default; Sol resolver falls back
// to V2.0 line-only behavior when bytes are missing).
ByteOffset int
// Order (W-C W7.3, 2026-05-18): source-order index. Carried to the
// resolved Edge.Order field. Currently populated by Sol's
// runHasModifier walker; ignored elsewhere.
Order int
DispatchKind string
}
PendingRef is an unresolved cross-file reference produced in Pass 1 and resolved (or marked AMBIGUOUS) in Pass 2.
DispatchKind (Track C P1b, schema 1.7): optional metadata for `invokes` edges. Empty for static `calls`. Carried through Pass 2 Resolve so the final edge row preserves the dispatch classification decided at AST time (when types.Info is still in scope).
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry maps file extensions to parser instances.
func NewRegistry ¶
func NewRegistry() *Registry
NewRegistry returns an empty registry. Use Register to add parsers.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package golang is the Go-language parser for CKG.
|
Package golang is the Go-language parser for CKG. |
|
Package proto implements the CKG parser for `.proto` files (schema 1.9 W3a).
|
Package proto implements the CKG parser for `.proto` files (schema 1.9 W3a). |
|
Package solidity implements the CKG parser for .sol files (spec §4.6.3).
|
Package solidity implements the CKG parser for .sol files (spec §4.6.3). |
|
binding
Package binding wraps the tree-sitter-solidity grammar (vendored from github.com/JoranHonig/tree-sitter-solidity v1.2.11, MIT-licensed) into a *sitter.Language usable by github.com/tree-sitter/go-tree-sitter.
|
Package binding wraps the tree-sitter-solidity grammar (vendored from github.com/JoranHonig/tree-sitter-solidity v1.2.11, MIT-licensed) into a *sitter.Language usable by github.com/tree-sitter/go-tree-sitter. |
|
Package typescript — body_walk.go implements P3 of the TS parser: statement-level call extraction inside function/method bodies.
|
Package typescript — body_walk.go implements P3 of the TS parser: statement-level call extraction inside function/method bodies. |
Click to show internal directories.
Click to hide internal directories.