Documentation
¶
Index ¶
- type PythonRunner
- func (r PythonRunner) DumpAST() []*pb.File
- func (r *PythonRunner) Ensure() error
- func (r PythonRunner) Finish() error
- func (r PythonRunner) IsRequired() bool
- func (r PythonRunner) Name() string
- func (r PythonRunner) Parse(path string) (*pb.File, error)
- func (r *PythonRunner) SetConfiguration(configuration *configuration.Configuration)
- func (r *PythonRunner) SetProgressbar(progressbar *pterm.SpinnerPrinter)
- type TreeSitterAdapter
- func (a *TreeSitterAdapter) AttachQualified(parentClass string, fn string) string
- func (a *TreeSitterAdapter) Decision(n *sitter.Node) (Treesitter.DecisionKind, *sitter.Node)
- func (a *TreeSitterAdapter) EachChildBody(body *sitter.Node, yield func(*sitter.Node))
- func (a *TreeSitterAdapter) EachParamIdent(params *sitter.Node, yield func(string))
- func (a *TreeSitterAdapter) Imports(n *sitter.Node) []Treesitter.ImportItem
- func (a *TreeSitterAdapter) IsClass(n *sitter.Node) bool
- func (a *TreeSitterAdapter) IsFunction(n *sitter.Node) bool
- func (a *TreeSitterAdapter) IsModule(n *sitter.Node) bool
- func (a *TreeSitterAdapter) Language() *sitter.Language
- func (a *TreeSitterAdapter) ModuleNameFromPath(path string) string
- func (a *TreeSitterAdapter) NodeBody(n *sitter.Node) *sitter.Node
- func (a *TreeSitterAdapter) NodeName(n *sitter.Node) string
- func (a *TreeSitterAdapter) NodeParams(n *sitter.Node) *sitter.Node
- func (a *TreeSitterAdapter) SetSource(src []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PythonRunner ¶
type PythonRunner struct {
Configuration *configuration.Configuration
// contains filtered or unexported fields
}
func (PythonRunner) DumpAST ¶
func (r PythonRunner) DumpAST() []*pb.File
DumpAST parses Python files and returns in-memory AST objects
func (PythonRunner) IsRequired ¶
func (r PythonRunner) IsRequired() bool
IsRequired returns true when analyzed files are concerned by the programming language
func (PythonRunner) Name ¶
func (r PythonRunner) Name() string
func (PythonRunner) Parse ¶
func (r PythonRunner) Parse(path string) (*pb.File, error)
Parse a file and return a protobuf-compatible AST object (no store)
func (*PythonRunner) SetConfiguration ¶
func (r *PythonRunner) SetConfiguration(configuration *configuration.Configuration)
Give the configuration to the engine
func (*PythonRunner) SetProgressbar ¶
func (r *PythonRunner) SetProgressbar(progressbar *pterm.SpinnerPrinter)
Give a UI progress bar to the engine
type TreeSitterAdapter ¶
type TreeSitterAdapter struct {
// contains filtered or unexported fields
}
func NewTreeSitterAdapter ¶
func NewTreeSitterAdapter(src []byte) *TreeSitterAdapter
func (*TreeSitterAdapter) AttachQualified ¶
func (a *TreeSitterAdapter) AttachQualified(parentClass string, fn string) string
func (*TreeSitterAdapter) Decision ¶
func (a *TreeSitterAdapter) Decision(n *sitter.Node) (Treesitter.DecisionKind, *sitter.Node)
func (*TreeSitterAdapter) EachChildBody ¶
func (a *TreeSitterAdapter) EachChildBody(body *sitter.Node, yield func(*sitter.Node))
func (*TreeSitterAdapter) EachParamIdent ¶
func (a *TreeSitterAdapter) EachParamIdent(params *sitter.Node, yield func(string))
func (*TreeSitterAdapter) Imports ¶
func (a *TreeSitterAdapter) Imports(n *sitter.Node) []Treesitter.ImportItem
func (*TreeSitterAdapter) IsFunction ¶
func (a *TreeSitterAdapter) IsFunction(n *sitter.Node) bool
func (*TreeSitterAdapter) Language ¶
func (a *TreeSitterAdapter) Language() *sitter.Language
func (*TreeSitterAdapter) ModuleNameFromPath ¶
func (a *TreeSitterAdapter) ModuleNameFromPath(path string) string
func (*TreeSitterAdapter) NodeBody ¶
func (a *TreeSitterAdapter) NodeBody(n *sitter.Node) *sitter.Node
func (*TreeSitterAdapter) NodeParams ¶
func (a *TreeSitterAdapter) NodeParams(n *sitter.Node) *sitter.Node
func (*TreeSitterAdapter) SetSource ¶
func (a *TreeSitterAdapter) SetSource(src []byte)
Click to show internal directories.
Click to hide internal directories.