Documentation
¶
Overview ¶
Package compress extracts signature-only summaries of source files using tree-sitter grammars registered in internal/lang. The result keeps doc comments and declaration signatures while dropping bodies, so an LLM can reason about structure without paying for implementation tokens. The cgo build provides the real engine; the no-cgo build keeps the original source.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compressor ¶
type Compressor struct {
// contains filtered or unexported fields
}
Compressor produces signature summaries for registered languages by delegating to the pooled tree-sitter engine in internal/lang/signature.
func New ¶
func New() *Compressor
New returns a Compressor backed by a signature engine with a parser pool for every registered language.
func (*Compressor) Compress ¶
Compress returns a signature-only summary of src for id. The boolean result reports whether any declaration was emitted; false means the source is returned unchanged (nothing to compress or a parse failure).
func (*Compressor) LanguageForPath ¶
func (c *Compressor) LanguageForPath(path string) (lang.ID, bool)
LanguageForPath returns the language for a path that has a registered signature spec, if any.