Documentation
¶
Overview ¶
Package treeanalyzer extracts conservative, language-neutral code structure with the pure-Go Tree-sitter runtime. Language-specific analyzers remain the authority when one is registered (notably Go, Markdown, and SQL).
Index ¶
- Constants
- func RunProcessWorker(ctx context.Context, input io.Reader, output io.Writer) error
- func Supports(language string, files []scan.File) bool
- type Analyzer
- func (a *Analyzer) Analyze(ctx context.Context, _ string, files []scan.File) (*lang.AnalysisResult, error)
- func (a *Analyzer) AnalyzeWithFileCache(ctx context.Context, _ string, files []scan.File, ...) (*lang.AnalysisResult, error)
- func (a *Analyzer) AnalyzeWithProgress(ctx context.Context, _ string, files []scan.File, ...) (*lang.AnalysisResult, error)
- func (a *Analyzer) Extensions() []string
- func (a *Analyzer) Language() string
Constants ¶
const InternalWorkerCommand = "__tree-analyzer-worker"
InternalWorkerCommand is intentionally omitted from the public CLI help. The parent Ravel process uses it to isolate Tree-sitter runtimes and their process-wide parser state.
Variables ¶
This section is empty.
Functions ¶
func RunProcessWorker ¶ added in v0.2.6
RunProcessWorker serves the hidden single-threaded parser process protocol. It is exported only so the CLI package can route the hidden command without creating a package cycle.
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
func NewWithJobs ¶ added in v0.2.7
func (*Analyzer) AnalyzeWithFileCache ¶ added in v0.2.7
func (*Analyzer) AnalyzeWithProgress ¶ added in v0.2.4
func (*Analyzer) Extensions ¶
Extensions are supplied by gotreesitter's grammar registry. Ravel dispatches already-audited files by their scanner language, so this method is metadata.