Documentation
¶
Overview ¶
Package lang is the facade external consumers import. It centralizes every language-specific decision in Sift: file-path role classification for ranking, smart-filter rules, and (in cgo builds) tree-sitter signature extraction. Concrete types live in the leaf types package, global tables in registry, and the signature engine in the cgo-only signature subpackage; language drivers register themselves via init() and are pulled in by imports.go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Classification ¶
type Classification = types.Classification
Classification is a soft selection signal for ranking and budgeting.
func Classify ¶
func Classify(path string) Classification
Classify applies shared conventions and then the language driver rules.
type ID ¶
ID uniquely identifies a supported language.
const ( Go ID = types.Go JavaScript ID = types.JavaScript TypeScript ID = types.TypeScript TSX ID = types.TSX Python ID = types.Python Rust ID = types.Rust Java ID = types.Java Kotlin ID = types.Kotlin CSharp ID = types.CSharp Cpp ID = types.Cpp Ruby ID = types.Ruby PHP ID = types.PHP Swift ID = types.Swift Other ID = types.Other )
Language IDs.
type Role ¶
Role describes the likely architecture purpose of a file.
const ( RoleUnknown Role = types.RoleUnknown RoleEntrypoint Role = types.RoleEntrypoint RoleAPI Role = types.RoleAPI RoleImpl Role = types.RoleImpl RoleTest Role = types.RoleTest RoleFixture Role = types.RoleFixture RoleMock Role = types.RoleMock RoleConfig Role = types.RoleConfig RoleSchema Role = types.RoleSchema RoleDocs Role = types.RoleDocs RoleGenerated Role = types.RoleGenerated RoleExample Role = types.RoleExample RoleVendor Role = types.RoleVendor )
File roles.
type SignatureResolver ¶
type SignatureResolver = types.SignatureResolver
SignatureResolver is an optional capability of a Language that maps a path to the signature registry ID for it.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package registry owns the global language lookup tables and the shared path-convention rules.
|
Package registry owns the global language lookup tables and the shared path-convention rules. |
|
Package signature owns the tree-sitter signature engine: per-language SignatureSpec registration and a pooled parser engine that reduces source to declaration signatures.
|
Package signature owns the tree-sitter signature engine: per-language SignatureSpec registration and a pooled parser engine that reduces source to declaration signatures. |
|
Package types defines the core language contracts shared by every driver and the registry.
|
Package types defines the core language contracts shared by every driver and the registry. |