Documentation
¶
Index ¶
- func CreateFileDocNode(filePath string, relPath string) (*types.ASTNode, error)
- func ExtractGoRoutes(file *ast.File, fset *token.FileSet, content []byte, relPath string) ([]types.ASTNode, []types.ASTEdge)
- func ExtractJSRoutes(content []byte, relPath string) ([]types.ASTNode, []types.ASTEdge)
- func ExtractRoutes(content []byte, relPath string) ([]types.ASTNode, []types.ASTEdge)
- func IsFileDocCandidate(relPath string) bool
- func IsSupported(filePath string) bool
- func SupportedExtensions() []string
- type ParseResult
- type Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFileDocNode ¶
CreateFileDocNode reads a file and creates a searchable document node with the file's content as a bounded text snippet.
func ExtractGoRoutes ¶
func ExtractGoRoutes(file *ast.File, fset *token.FileSet, content []byte, relPath string) ([]types.ASTNode, []types.ASTEdge)
ExtractGoRoutes extracts route-like registrations from Go AST.
func ExtractJSRoutes ¶
ExtractJSRoutes extracts route-like definitions from JS/TS source code.
func ExtractRoutes ¶
ExtractRoutes extracts Laravel route definitions from PHP source code.
func IsFileDocCandidate ¶
IsFileDocCandidate returns true if the file path matches one of the file document indexing patterns. This function does NOT check if the file is already handled by tree-sitter — the caller should check that.
func IsSupported ¶
IsSupported returns true if the file extension is supported for parsing
func SupportedExtensions ¶
func SupportedExtensions() []string
SupportedExtensions returns the list of supported file extensions
Types ¶
type ParseResult ¶
ParseResult contains the extracted nodes and edges from a file