5d837e99a1
internal/parser/forest/ — generic Extractor wrapping any alexaandru/go-sitter-forest grammar through the existing tsitter shim (unsafe.Pointer ABI). Reads the grammar's tags.scm when present, falls back to a node-kind walker otherwise. @reference.call / @reference.function captures route to the enclosing function via a two-pass buildFuncRanges lookup; module-level calls fall back to the file node. Signature-only depth — ORM / contracts / dataflow stay exclusive to the hand-written tier. 165 forest-backed languages registered in forest_registrations.go across frontend / schemas / IaC / shaders / docs / functional / build / DSL / query / configs. registerForestLanguages skips any row whose name or extension is already claimed by a hand-written extractor so bespoke depth always wins. README and docs/languages.md refreshed: total registered languages 92 → 256.
8 lines
239 B
Go
8 lines
239 B
Go
package forest
|
|
|
|
import "errors"
|
|
|
|
// errNilLanguage is returned when a grammar's GetLanguage() returns
|
|
// nil. Sticky: cached on the Extractor, never retried.
|
|
var errNilLanguage = errors.New("forest: grammar returned nil language pointer")
|