Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileNode ¶
type FileNode struct {
// contains filtered or unexported fields
}
func NewFileNode ¶
func NewFileNode(nodeManager *NodeManager, file string, packageName string) *FileNode
type FunctionNode ¶
type FunctionNode struct {
// contains filtered or unexported fields
}
func NewFunctionNode ¶
func (*FunctionNode) SameParameter ¶
func (s *FunctionNode) SameParameter(node *FunctionNode) bool
func (*FunctionNode) SameReturns ¶
func (s *FunctionNode) SameReturns(node *FunctionNode) bool
func (*FunctionNode) String ¶
func (s *FunctionNode) String() string
type InterfaceNode ¶
type InterfaceNode struct {
// contains filtered or unexported fields
}
func NewInterfaceNode ¶
func NewInterfaceNode(fileNode *FileNode, name string, content string, embedInterface ds.BuiltinSet[string], methods map[string]*FunctionNode) *InterfaceNode
func (*InterfaceNode) AllMethods ¶
func (i *InterfaceNode) AllMethods() []*FunctionNode
type NodeManager ¶
type NodeManager struct {
// contains filtered or unexported fields
}
func NewParser ¶
func NewParser(projectPath string) *NodeManager
func (*NodeManager) AnalysisInterface ¶
func (*NodeManager) Inspect ¶
func (n *NodeManager) Inspect(file string) error
Inspect 解析源文件,解析出对应的结构体,接口,函数
func (*NodeManager) ParseStructFunctions ¶
func (n *NodeManager) ParseStructFunctions()
type StructNode ¶
type StructNode struct {
// contains filtered or unexported fields
}
func NewStructNode ¶
func NewStructNode(fileNode *FileNode, name string, embedFields ds.BuiltinSet[string], fields map[string]*FieldInfo) *StructNode
Click to show internal directories.
Click to hide internal directories.