Documentation
¶
Overview ¶
Package sourcecode parses source files into deterministic structural metadata.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
Path string
Language Language
Package string
Imports []Import
Symbols []Symbol
Generated bool
}
File is a parsed source file structure suitable for maps, retrieval, and chunking.
type GoParser ¶
type GoParser struct{}
GoParser parses Go files using the standard library parser and AST.
type Language ¶
type Language string
Language identifies the parser/language used for a source file.
const (
LanguageGo Language = "go"
)
Supported source languages.
type Symbol ¶
type Symbol struct {
Kind SymbolKind
Name string
Receiver string
Signature string
StartLine int
EndLine int
StartOffset int
EndOffset int
}
Symbol is a deterministic top-level source declaration range.
type SymbolKind ¶
type SymbolKind string
SymbolKind identifies the structural kind of a parsed symbol.
const ( SymbolKindConst SymbolKind = "const" SymbolKindVar SymbolKind = "var" SymbolKindType SymbolKind = "type" SymbolKindTypeAlias SymbolKind = "type_alias" SymbolKindStruct SymbolKind = "struct" SymbolKindInterface SymbolKind = "interface" SymbolKindFunc SymbolKind = "func" SymbolKindMethod SymbolKind = "method" )
Supported symbol kinds.
func (SymbolKind) IsType ¶
func (k SymbolKind) IsType() bool
IsType reports whether k is any named type declaration shape.
Click to show internal directories.
Click to hide internal directories.