Documentation
¶
Index ¶
- Variables
- func GetLanguage(filePath string) *sitter.Language
- func IsConfigFile(filePath string) bool
- func IsSFCFile(filePath string) bool
- func IsSupportedFile(filePath string) bool
- func IsTailwindConfigFile(filePath string) bool
- func SaveCache(cache *RepoMapCache) error
- type CachedFile
- type FileSymbols
- type RepoMap
- type RepoMapCache
- type SFCSection
- type Symbol
Constants ¶
This section is empty.
Variables ¶
View Source
var SupportedLanguages = map[string]*sitter.Language{ ".go": golang.GetLanguage(), ".js": javascript.GetLanguage(), ".ts": typescript.GetLanguage(), ".py": python.GetLanguage(), ".jsx": javascript.GetLanguage(), ".tsx": typescript.GetLanguage(), ".mjs": javascript.GetLanguage(), ".rs": rust.GetLanguage(), ".java": java.GetLanguage(), ".c": c.GetLanguage(), ".h": c.GetLanguage(), ".cpp": cpp.GetLanguage(), ".hpp": cpp.GetLanguage(), ".cc": cpp.GetLanguage(), ".rb": ruby.GetLanguage(), ".kt": kotlin.GetLanguage(), ".kts": kotlin.GetLanguage(), ".swift": swift.GetLanguage(), ".cs": csharp.GetLanguage(), ".scala": scala.GetLanguage(), ".php": php.GetLanguage(), ".ex": elixir.GetLanguage(), ".exs": elixir.GetLanguage(), ".lua": lua.GetLanguage(), ".css": css.GetLanguage(), ".scss": css.GetLanguage(), ".html": html.GetLanguage(), ".htm": html.GetLanguage(), ".yaml": yaml.GetLanguage(), ".yml": yaml.GetLanguage(), ".toml": toml.GetLanguage(), ".sql": sql.GetLanguage(), ".sh": bash.GetLanguage(), ".bash": bash.GetLanguage(), ".zsh": bash.GetLanguage(), ".md": markdown.GetLanguage(), ".markdown": markdown.GetLanguage(), "Dockerfile": dockerfile.GetLanguage(), "Makefile": nil, ".mk": nil, "Jenkinsfile": nil, ".vue": nil, ".svelte": nil, }
SupportedLanguages は対応言語のマップ
Functions ¶
func IsConfigFile ¶ added in v0.31.0
IsConfigFile は設定ファイル系言語かどうか(正規表現ベース抽出用)
func IsSupportedFile ¶
IsSupportedFile はサポートされているファイルかどうか
func IsTailwindConfigFile ¶ added in v0.31.0
IsTailwindConfigFile は Tailwind CSS 設定ファイルかどうか(Issue #65)
Types ¶
type CachedFile ¶ added in v0.46.0
type CachedFile struct {
Path string `json:"path"`
ModTime time.Time `json:"mod_time"`
Symbols []Symbol `json:"symbols"`
}
CachedFile はキャッシュされたファイル情報
type FileSymbols ¶
FileSymbols はファイル内のシンボル一覧
func ExtractSymbols ¶
func ExtractSymbols(filePath string) (*FileSymbols, error)
ExtractSymbols はファイルからシンボルを抽出
type RepoMap ¶
type RepoMap struct {
RootPath string
Files []*FileSymbols
MaxTokens int // トークン制限
}
RepoMap はリポジトリのコード構造マップ
func NewRepoMap ¶
NewRepoMap は新しいRepoMapを作成
type RepoMapCache ¶ added in v0.46.0
type RepoMapCache struct {
RootPath string `json:"root_path"`
UpdatedAt time.Time `json:"updated_at"`
Files map[string]*CachedFile `json:"files"`
}
RepoMapCache はRepoMapのキャッシュ
func LoadCache ¶ added in v0.46.0
func LoadCache(rootPath string) (*RepoMapCache, error)
LoadCache はキャッシュを読み込む
Source Files
¶
- cache.go
- extractor.go
- extractor_c.go
- extractor_config.go
- extractor_csharp.go
- extractor_css.go
- extractor_go.go
- extractor_html.go
- extractor_java.go
- extractor_javascript.go
- extractor_kotlin.go
- extractor_other.go
- extractor_php.go
- extractor_python.go
- extractor_ruby.go
- extractor_rust.go
- extractor_scala.go
- extractor_sfc.go
- extractor_swift.go
- extractor_tailwind.go
- parser.go
- repomap.go
- symbols.go
Click to show internal directories.
Click to hide internal directories.