Documentation
¶
Overview ¶
Package javascript implements a tree-sitter-based parser for JavaScript and TypeScript source files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency struct {
Path string
Type string // "import" | "require"
LineNumber int
IsLocal bool
}
Dependency represents an import or require statement.
type Entity ¶
type Entity struct {
Name string
Type string // "function" | "method" | "class"
Kind string // "function" | "async_function" | "arrow_function" | "async_arrow_function" | "method" | "async_method" | "class"
Signature string
StartLine int
EndLine int
Docs string
Parent string // enclosing class name, or ""
}
Entity represents a named code element.
type ParseResult ¶
type ParseResult struct {
FilePath string
Entities []*Entity
Dependencies []*Dependency
}
ParseResult is the output of Parse.
Click to show internal directories.
Click to hide internal directories.