parser

package
v0.0.0-...-d6036ea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Symbol

type Symbol struct {
	Name     string `json:"name"`
	Type     string `json:"type"`      // 符号类型: function, class, interface, type, method, type_alias
	FilePath string `json:"file_path"` // 所在文件路径
}

Symbol 代表从代码中提取出的一个代码符号

func IndexDirectory

func IndexDirectory(dir string) ([]Symbol, error)

IndexDirectory 递归扫描目录下的所有支持的文件, 提取符号并返回

func ParseFile

func ParseFile(filePath string) ([]Symbol, error)

ParseFile 根据文件扩展名选择合适的解析器解析指定文件

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL